:root {
  color-scheme: dark;
  --bg: #0f1216;
  --surface: #151a20;
  --ink: #f1f4f7;
  --muted: #a5b0ba;
  --accent: #89a9c2;
  --accent-soft: #1f2832;
  --line: rgba(241, 244, 247, 0.08);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  --radius: 20px;
}

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

html {
  scroll-padding-top: 40px;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at top left, #1a2028 0%, #0f1216 55%, #0b0d10 100%);
  color: var(--ink);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(137, 169, 194, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137, 169, 194, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: -1;
}

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

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 18, 22, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 8vw;
  gap: 16px;
}

.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(21, 26, 32, 0.9);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}

.nav-links a {
  padding: 4px 8px;
  border-radius: 8px;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a.is-active {
  color: var(--ink);
  background: rgba(137, 169, 194, 0.18);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.nav-cta {
  padding: 8px 14px;
  border-radius: 999px;
  background: #f1f4f7;
  color: #0f1216;
  font-size: 13px;
}

.nav-cta.is-active {
  box-shadow: 0 0 0 2px rgba(137, 169, 194, 0.45), 0 8px 20px rgba(0, 0, 0, 0.3);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(21, 26, 32, 0.7);
  color: var(--ink);
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle .bar {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.navbar.menu-open .menu-toggle .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar.menu-open .menu-toggle .bar:nth-child(2) {
  opacity: 0;
}

.navbar.menu-open .menu-toggle .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.theme-toggle {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(21, 26, 32, 0.7);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}

main {
  padding: 40px 8vw 80px;
}

.hero {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: center;
  min-height: 70vh;
  padding-top: 40px;
  display: grid;
}

.eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.6rem, 4vw, 3.8rem);
  line-height: 1.1;
  font-weight: 600;
}

.hero h1 span {
  display: block;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 14px;
}

.tagline {
  margin: 26px 0 32px;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
}

.cta-row {
  display: flex;
  gap: 14px;
  margin-bottom: 32px;
}

.primary-btn,
.ghost-btn {
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  background: var(--accent);
  color: #0f1216;
  box-shadow: 0 14px 32px rgba(137, 169, 194, 0.25);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(21, 26, 32, 0.7);
  color: var(--ink);
}

.resume-btn {
  background: linear-gradient(135deg, #7fa9cb, #96b8d4);
  border: 1px solid rgba(165, 198, 222, 0.6);
  color: #0b1620;
  padding: 14px 28px;
  box-shadow: 0 12px 30px rgba(137, 169, 194, 0.35), 0 0 0 1px rgba(172, 205, 228, 0.2) inset;
}

.resume-btn:hover {
  box-shadow: 0 16px 34px rgba(137, 169, 194, 0.48), 0 0 20px rgba(137, 169, 194, 0.35);
}

.hero .cta-row .cta-btn {
  background: linear-gradient(135deg, #7fa9cb, #96b8d4);
  border: 1px solid rgba(165, 198, 222, 0.62);
  color: #0b1620;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(137, 169, 194, 0.36), 0 0 0 1px rgba(172, 205, 228, 0.22) inset;
}

.hero .cta-row .cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(137, 169, 194, 0.5), 0 0 20px rgba(137, 169, 194, 0.35);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.hero-metrics > div {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(21, 26, 32, 0.85);
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.hero-metrics h3 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.hero-metrics p {
  font-size: 0.88rem;
  color: var(--muted);
}

.hero-recognition {
  margin-top: 14px;
  grid-template-columns: 1fr;
}

.hero-recognition > div {
  grid-column: 1 / -1;
}

.hero-recognition h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.hero-recognition p {
  font-size: 0.9rem;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-photo {
  width: min(420px, 90%);
  aspect-ratio: 3 / 4;
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  animation: float 6s ease-in-out infinite;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 18, 22, 0) 35%, rgba(15, 18, 22, 0.55) 100%);
  pointer-events: none;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}

.hero-grid {
  position: absolute;
  inset: 0;
  border-radius: 40px;
  border: 1px dashed rgba(137, 169, 194, 0.25);
  transform: rotate(-3deg);
}

.section {
  margin-top: 90px;
  padding-top: 22px;
  border-top: 1px solid rgba(137, 169, 194, 0.08);
}

section[id] {
  scroll-margin-top: 40px;
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
  position: relative;
}

.section-title p {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--muted);
}

.section-title h2 {
  font-family: "Spectral", serif;
  font-size: clamp(1.8rem, 2.7vw, 2.5rem);
}

.section-title::after {
  content: "";
  width: 80px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.about-content {
  display: grid;
  gap: 20px;
  max-width: 760px;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item {
  padding: 18px 22px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.timeline-item h3 {
  font-size: 1.1rem;
}

.timeline-item p {
  color: var(--muted);
}

.timeline-item span {
  font-size: 0.9rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card.highlight {
  border-color: var(--line);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(137, 169, 194, 0.8), transparent);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.4);
}

.card-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

.card ul {
  display: grid;
  gap: 10px;
  padding-left: 18px;
  color: var(--muted);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.skill-group h3 {
  margin-bottom: 16px;
}

.skill {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.skill span {
  font-size: 0.9rem;
}

.bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(137, 169, 194, 0.18);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #89a9c2, #d0e3f3);
  border-radius: 999px;
}

.skill-chip {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(21, 26, 32, 0.7);
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
}

.tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tags span {
  background: rgba(137, 169, 194, 0.16);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.project-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(21, 26, 32, 0.72);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
}

.project-link:hover {
  transform: translateY(-1px);
}

.achievements .achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.achievement {
  padding: 18px 20px;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  text-align: center;
  display: grid;
  place-items: center;
}

.achievement::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(137, 169, 194, 0.15), transparent 55%);
  pointer-events: none;
}

.achievement:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.contact-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.contact-card > div {
  display: grid;
  align-content: start;
  gap: 6px;
}

.contact-card a {
  color: var(--accent);
}

.contact-card .download-btn {
  display: inline-flex;
  margin-top: 12px;
  color: #0f1216;
}

.contact-note {
  background: rgba(137, 169, 194, 0.12);
  padding: 18px;
  border-radius: 16px;
}

.site-footer {
  padding: 30px 8vw 50px;
  color: var(--muted);
  font-size: 0.9rem;
}

body.light-theme {
  color-scheme: light;
  --bg: #eef3fa;
  --surface: #ffffff;
  --ink: #1c2733;
  --muted: #596b7d;
  --accent: #5f8fb7;
  --accent-soft: #d7e5f2;
  --line: rgba(28, 39, 51, 0.12);
  --shadow: 0 18px 44px rgba(18, 30, 42, 0.14);
  background: radial-gradient(circle at top left, #d6e5f3 0%, #eef3fa 60%, #f7faff 100%);
}

body.light-theme::before {
  background-image: linear-gradient(rgba(28, 39, 51, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 39, 51, 0.045) 1px, transparent 1px);
}

body.light-theme .site-header {
  background: rgba(245, 250, 255, 0.9);
}

body.light-theme .logo {
  background: #ffffff;
}

body.light-theme .nav-cta {
  background: #1f4f78;
  color: #f7fbff;
}

body.light-theme .nav-links a.is-active {
  background: rgba(31, 79, 120, 0.16);
  box-shadow: 0 8px 18px rgba(31, 79, 120, 0.14);
}

body.light-theme .nav-cta.is-active {
  box-shadow: 0 0 0 2px rgba(31, 79, 120, 0.35), 0 8px 20px rgba(31, 79, 120, 0.2);
}

body.light-theme .theme-toggle {
  background: rgba(255, 255, 255, 0.85);
  color: #1c2733;
}

body.light-theme .menu-toggle {
  background: rgba(255, 255, 255, 0.85);
  color: #1c2733;
}

body.light-theme .primary-btn {
  background: #4f81ab;
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(39, 84, 122, 0.24);
}

body.light-theme .contact-card .download-btn {
  color: #ffffff;
}

body.light-theme .ghost-btn {
  background: #ffffff;
}

body.light-theme .resume-btn {
  background: linear-gradient(135deg, #4f81ab, #6495bf);
  border-color: rgba(53, 101, 141, 0.35);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(39, 84, 122, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

body.light-theme .resume-btn:hover {
  box-shadow: 0 16px 36px rgba(39, 84, 122, 0.4), 0 0 18px rgba(89, 136, 175, 0.28);
}

body.light-theme .hero .cta-row .cta-btn {
  background: linear-gradient(135deg, #4f81ab, #6495bf);
  border-color: rgba(53, 101, 141, 0.35);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(39, 84, 122, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

body.light-theme .hero .cta-row .cta-btn:hover {
  box-shadow: 0 16px 36px rgba(39, 84, 122, 0.4), 0 0 18px rgba(89, 136, 175, 0.28);
}

body.light-theme .skill-chip {
  background: #f6fafe;
}

body.light-theme .bar {
  background: #d7e3f1;
}

body.light-theme .bar span {
  background: linear-gradient(90deg, #2f6ea8, #5e9cd4);
}

body.light-theme .project-link {
  background: #f3f8fd;
}

body.light-theme .hero-photo::after {
  background: linear-gradient(180deg, rgba(238, 243, 250, 0) 35%, rgba(238, 243, 250, 0.45) 100%);
}

body.light-theme .navbar.menu-open .nav-links {
  background: rgba(255, 255, 255, 0.92);
}

body.light-theme .hero-metrics > div {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(28, 39, 51, 0.14);
  box-shadow: 0 12px 24px rgba(30, 48, 66, 0.12);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateX(28px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-section {
  animation: fadeUp 0.9s ease both;
}

.hero-content {
  animation: fadeUp 0.9s ease both;
}

.hero-visual {
  animation: slideIn 1.1s ease both;
}

.animate-section:nth-of-type(1) {
  animation-delay: 0.05s;
}

.animate-section:nth-of-type(2) {
  animation-delay: 0.15s;
}

.animate-section:nth-of-type(3) {
  animation-delay: 0.25s;
}

.animate-section:nth-of-type(4) {
  animation-delay: 0.35s;
}

.animate-section:nth-of-type(5) {
  animation-delay: 0.45s;
}

.animate-section:nth-of-type(6) {
  animation-delay: 0.55s;
}

.animate-section:nth-of-type(7) {
  animation-delay: 0.65s;
}

.animate-section:nth-of-type(8) {
  animation-delay: 0.75s;
}

.animate-section:nth-of-type(9) {
  animation-delay: 0.85s;
}

.animate-section:nth-of-type(10) {
  animation-delay: 0.95s;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 960px) {
  .navbar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-actions {
    width: 100%;
    justify-content: center;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-recognition > div {
    grid-column: auto;
  }

  .hero-photo {
    width: min(360px, 90%);
    margin-top: 20px;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 52px;
  }

  section[id] {
    scroll-margin-top: 52px;
  }

  .navbar {
    padding: 12px 6vw;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links,
  .nav-actions {
    display: none;
    width: 100%;
  }

  .navbar.menu-open .nav-links,
  .navbar.menu-open .nav-actions {
    display: flex;
  }

  .navbar.menu-open .nav-links {
    margin-top: 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(15, 18, 22, 0.7);
  }

  .navbar.menu-open .nav-links a {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }

  .navbar.menu-open .nav-links a.is-active {
    background: rgba(137, 169, 194, 0.2);
  }

  .navbar.menu-open .nav-links a:last-child {
    border-bottom: 0;
  }

  .navbar.menu-open .nav-actions {
    margin-top: 4px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
  }

  .navbar.menu-open .nav-cta,
  .navbar.menu-open .theme-toggle {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  main {
    padding: 32px 6vw 60px;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 9vw, 2.8rem);
  }

  .tagline {
    font-size: 0.98rem;
  }

  .cta-row {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
    text-align: center;
  }

  .hero-photo {
    width: min(320px, 100%);
  }

  .section {
    margin-top: 70px;
  }

  .section-title h2 {
    font-size: clamp(1.6rem, 6.5vw, 2rem);
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .achievement-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 20px;
  }

  .contact-card .download-btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  html {
    scroll-padding-top: 48px;
  }

  section[id] {
    scroll-margin-top: 48px;
  }

  .logo {
    font-size: 16px;
    padding: 4px 10px;
  }

  .navbar.menu-open .nav-links {
    font-size: 12px;
    gap: 10px;
  }

  main {
    padding: 28px 5vw 54px;
  }

  .hero {
    gap: 28px;
  }

  .hero-photo {
    width: min(280px, 100%);
  }

  .hero-metrics > div {
    padding: 14px;
  }

  .contact-card {
    padding: 16px;
  }

  .contact-note {
    padding: 14px;
  }
}
