/* Brand Colors */
:root {
  --primary: #007bff;
  --primary-light: #38a0ff;
  --background: #191310;
  --secondary: #231c18;
  --text: #ffffff;
  --text-muted: #94a3b8;
  --border: #30363d;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--background);
  color: var(--text);
}

h1,
h2,
h3,
.logo {
  font-family: "Orbitron", sans-serif;
}

a {
  color: var(--text);
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

p {
  line-height: 1.8;
}

h1 span,
h2 span,
.logo span {
  color: var(--primary-light);
}

::selection {
  background-color: var(--primary);
  color: white;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  background: rgba(25, 19, 16, 0.92);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
  font-size: 28px;
  font-weight: 800;
}

nav {
  display: flex;
  gap: 24px;
}

nav a {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.3s;
}

nav a:hover,
nav a.active {
  color: var(--primary-light);
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: transparent;
  color: white;
  border: none;
  font-size: 25px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Hero Section */
.hero-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  min-height: 80vh;
  padding: 60px 0;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

/* Availability Badge */
.availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin-bottom: 24px;
  background: rgba(0, 123, 255, 0.08);
  border: 1px solid rgba(0, 123, 255, 0.3);
  border-radius: 30px;
  font-size: 12px;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
}

.hero-content h1 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.4;
  margin-bottom: 20px;
}

/* Animated Rotating Text */
.hero-role {
  display: flex;
  align-items: center;
  min-height: 75px;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(19px, 2.2vw, 28px);
  line-height: 1.5;
  margin-bottom: 16px;
  overflow: hidden;
}

#rotating-text {
  display: inline-block;
  color: var(--primary-light);
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

#rotating-text.fade-out {
  opacity: 0;
  transform: translateY(-20px);
}

#rotating-text.fade-in {
  opacity: 0;
  transform: translateY(20px);
}

.hero-content p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 650px;
}

/* Hero Image */
.hero-image {
  position: relative;
  flex-shrink: 0;
  width: 350px;
  isolation: isolate;
}

.hero-image::before {
  content: "";
  position: absolute;
  inset: 15%;
  background: var(--primary);
  filter: blur(90px);
  opacity: 0.15;
  z-index: -1;
  border-radius: 50%;
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  animation: floating 5s ease-in-out infinite;
}

@keyframes floating {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

/* Buttons */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: 0.3s ease;
}

.btn-primary {
  background: #0065d1;
  color: white;
  border: 2px solid #0065d1;
}

.btn-primary:hover {
  background: #0056b3;
  border-color: #0056b3;
  transform: translateY(-3px);
  box-shadow: 0 5px 25px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
  color: var(--primary-light);
  border: 2px solid var(--primary);
  background: transparent;
}

.btn-secondary:hover {
  background: #0065d1;
  color: white;
  transform: translateY(-3px);
}

/* General Sections */
.about-section,
.skills-section,
.projects-section,
.contact-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 32px;
  margin-bottom: 24px;
}

.section-description {
  color: var(--text-muted);
  margin-bottom: 30px;
}

/* About Section */
.about-section p {
  color: var(--text-muted);
  margin-bottom: 16px;
  max-width: 900px;
}

.about-grid,
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}

.about-card,
.project-card,
.skill-card {
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition:
    transform 0.3s,
    border-color 0.3s,
    box-shadow 0.3s;
}

.about-card:hover,
.project-card:hover,
.skill-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: 0 8px 30px rgba(0, 123, 255, 0.08);
}

.about-card i,
.project-icon {
  font-size: 32px;
  color: var(--primary-light);
  margin-bottom: 20px;
}

.about-card h3,
.project-card h3 {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.about-card p,
.project-card p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-card {
  text-align: center;
  padding: 30px 20px;
}

.skill-card i {
  font-size: 48px;
  margin-bottom: 20px;
}

.skill-card h3 {
  font-family: "Poppins", sans-serif;
  font-size: 16px;
}

.html-icon {
  color: #e34f26;
}

.css-icon {
  color: #1572b6;
}

.js-icon {
  color: #f7df1e;
}

.git-icon {
  color: #f05032;
}

.law-icon {
  color: #d4af37;
}

/* Projects Section */
.project-card {
  display: flex;
  flex-direction: column;
}

.project-card p {
  margin-bottom: 24px;
}

.project-card a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  color: var(--primary-light);
  font-size: 14px;
  font-weight: 600;
}

.project-card a:hover {
  text-decoration: underline;
}

/* Contact Section */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row input {
  flex: 1;
  min-width: 0;
}

input,
textarea {
  width: 100%;
  padding: 16px;
  background: var(--secondary);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: 0.3s;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

textarea {
  resize: vertical;
}

.contact-form button {
  align-self: flex-start;
}

#form-status {
  color: var(--text-muted);
  font-size: 14px;
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 30px 40px;
  border-top: 1px solid var(--border);
}

footer p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Social Media Icons */
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--secondary);
  font-size: 20px;
  transition: 0.3s;
}

.social-links a:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(0, 123, 255, 0.4);
}

/* Scroll Reveal Animation */
.reveal.pending {
  opacity: 0;
  transform: translateY(35px);
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 45px;
  height: 45px;
  background: #0065d1;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: 0.3s;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background: #0056b3;
}

/* Keyboard Accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 5px;
}

/* Tablet & Mobile */
@media (max-width: 768px) {
  header {
    padding: 20px;
  }

  .logo {
    font-size: 23px;
  }

  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    padding: 25px;
    background: var(--secondary);
    border-bottom: 1px solid var(--border);
  }

  nav.open {
    display: flex;
  }

  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 40px 0;
    min-height: auto;
  }

  .hero-role {
    justify-content: center;
    min-height: 70px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    width: 280px;
    max-width: 100%;
  }

  .section-title {
    font-size: 26px;
  }

  .about-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    flex-direction: column;
  }

  footer {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px;
  }

  .hero-content h1 {
    font-size: 28px;
  }

  .hero-role {
    font-size: 19px;
  }

  .skill-card {
    padding: 24px 12px;
  }

  .skill-card i {
    font-size: 38px;
  }

  .social-links {
    gap: 12px;
  }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal.pending {
    opacity: 1;
    transform: none;
  }
}
