/* ===== CSS Custom Properties ===== */
:root {
  --bg:           #0a192f;
  --bg-light:     #112240;
  --text:         #ccd6f6;
  --text-muted:   #8892b0;
  --accent:       #64ffda;
  --card:         #112240;
  --header-height: 70px;
  --max-width:    1000px;
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

a {
  text-decoration: none;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ===== Navbar ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  background-color: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0 2.5rem;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--bg-light);
}

.logo {
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links .nav-resume {
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.85rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links .nav-resume:hover {
  background-color: rgba(100, 255, 218, 0.1);
}

/* ===== Mobile menu toggle ===== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.menu-toggle:hover {
  color: var(--accent);
}

/* ===== Section base ===== */
section {
  padding: 6rem 2rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
}

.section-title::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--bg-light);
  flex: 1;
}

.section-title span {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 400;
  font-family: monospace;
}

/* ===== Mobile: Navbar ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1.5rem;
    position: relative;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background-color: var(--bg-light);
    border-top: 1px solid var(--bg);
    padding: 0.5rem 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links .nav-resume {
    border: none;
    padding: 0;
  }
}

/* ===== Hero ===== */
#hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  padding: 4rem 2rem;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  width: 100%;
}

.hero-text {
  flex: 1;
}

.hero-greeting {
  color: var(--accent);
  font-family: monospace;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.hero-name {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.hero-tagline {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn-primary {
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  background-color: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.9rem;
  transition: opacity 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-outline {
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.btn-outline:hover {
  background-color: rgba(100, 255, 218, 0.1);
}

.hero-socials {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.hero-socials a {
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
}

.hero-socials a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(100, 255, 218, 0.08);
}

/* ===== Mobile: Hero ===== */
@media (max-width: 768px) {
  #hero {
    padding: 3rem 1.5rem;
  }

  .hero-inner {
    flex-direction: column-reverse;
    gap: 2rem;
    text-align: center;
  }

  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }

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

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

  .hero-photo img {
    width: 140px;
    height: 140px;
  }
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: start;
}

.about-bio p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.about-facts {
  list-style: none;
  background-color: var(--bg-light);
  border-radius: 8px;
  padding: 1.5rem;
}

.about-facts li {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.88rem;
  color: var(--text);
}

.about-facts li:last-child {
  border-bottom: none;
}

.about-facts li span {
  color: var(--accent);
  font-size: 0.7rem;
  font-family: monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

/* ===== Skills ===== */
#skills {
  background-color: var(--bg-light);
}

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

.skill-group h3 {
  color: var(--accent);
  font-size: 0.85rem;
  font-family: monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.skill-group ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-group li {
  background-color: var(--bg);
  color: var(--accent);
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(100, 255, 218, 0.2);
}

/* ===== Mobile: About + Skills ===== */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  section {
    padding: 4rem 1.5rem;
  }
}

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background-color: var(--card);
  border-radius: 8px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(100, 255, 218, 0.08);
}

.project-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.project-card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.badge-featured {
  font-size: 0.65rem;
  font-family: monospace;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  background-color: rgba(100, 255, 218, 0.1);
  color: var(--accent);
  border: 1px solid rgba(100, 255, 218, 0.3);
  white-space: nowrap;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tags span {
  background-color: var(--bg);
  color: var(--accent);
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  border: 1px solid rgba(100, 255, 218, 0.15);
}

.project-links {
  display: flex;
  gap: 1rem;
  min-height: 1.2rem;
}

.project-links a {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.project-links a:hover {
  opacity: 0.7;
}

/* ===== Mobile: Projects ===== */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Contact ===== */
#contact {
  background-color: var(--bg-light);
}

.contact-inner {
  text-align: center;
}

.contact-inner .section-title {
  justify-content: center;
}

.contact-inner .section-title::after {
  display: none;
}

.contact-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid var(--bg);
  background-color: var(--bg);
  transition: border-color 0.2s ease, color 0.2s ease;
  width: 100%;
  max-width: 360px;
}

.contact-link svg {
  color: var(--accent);
  flex-shrink: 0;
}

.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Utility ===== */
.btn-standalone {
  margin-top: 2.5rem;
  display: inline-block;
}
