:root {
  --bg: #07111f;
  --bg-elevated: #0b1728;
  --bg-soft: #0c1b2f;
  --surface: rgba(16, 33, 54, 0.76);
  --surface-solid: #102136;
  --text: #f4f7fb;
  --muted: #a9b7ca;
  --faint: #72839b;
  --line: rgba(160, 187, 220, 0.16);
  --primary: #78e7cf;
  --primary-strong: #3dd8ba;
  --secondary: #7da8ff;
  --accent: #c89cff;
  --warning: #ffd276;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --container: 1180px;
  --header-height: 78px;
}

html[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-elevated: #ffffff;
  --bg-soft: #eaf0f7;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-solid: #ffffff;
  --text: #112033;
  --muted: #52647a;
  --faint: #7b8999;
  --line: rgba(30, 56, 87, 0.13);
  --primary: #087e6b;
  --primary-strong: #046e5e;
  --secondary: #315fde;
  --accent: #7a4bc6;
  --warning: #8e6200;
  --shadow: 0 26px 70px rgba(34, 56, 82, 0.13);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  color: #04110e;
  background: var(--primary);
}

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

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.brand-name {
  font-family: "Manrope", system-ui, sans-serif;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(3.25rem, 6.5vw, 6.35rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 4.5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

p {
  color: var(--muted);
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: 120px 0;
}

.section-soft {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, transparent, rgba(71, 123, 170, 0.055) 35%, transparent),
    var(--bg-soft);
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #04110e;
  background: var(--primary);
  border-radius: 10px;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-noise {
  position: fixed;
  z-index: -3;
  inset: 0;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  z-index: -2;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(73, 206, 181, 0.11), transparent 68%);
  transform: translate(-50%, -50%);
}

.site-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: rgba(7, 17, 31, 0.58);
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease, background 180ms ease;
}

html[data-theme="light"] .site-header {
  background: rgba(244, 247, 251, 0.73);
}

.site-header.scrolled {
  border-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand,
.nav-actions,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  color: #03120f;
  background: linear-gradient(135deg, var(--primary), #b8fff0);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 10px 28px rgba(61, 216, 186, 0.18);
}

.brand-name {
  font-weight: 750;
  letter-spacing: -0.02em;
}

.nav-links {
  gap: 30px;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
  transition: color 150ms ease;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--primary);
  border-radius: 20px;
  transform: scaleX(0);
  transition: transform 180ms ease;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-actions {
  gap: 10px;
}

.theme-toggle,
.menu-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 13px;
  place-items: center;
}

.menu-toggle {
  display: none;
}

.theme-icon {
  font-size: 1.25rem;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-small {
  min-height: 42px;
  padding-inline: 17px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.button-primary {
  color: #04110e;
  background: linear-gradient(135deg, var(--primary), #b5ffef);
  box-shadow: 0 15px 38px rgba(61, 216, 186, 0.18);
}

html[data-theme="light"] .button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #18a38c);
}

.button-outline {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}

.button-outline:hover,
.button-ghost:hover {
  border-color: color-mix(in srgb, var(--primary), transparent 45%);
  background: color-mix(in srgb, var(--surface-solid), var(--primary) 8%);
}

.button-ghost {
  color: var(--text);
  border-color: transparent;
  background: transparent;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 90px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  align-items: center;
  gap: clamp(50px, 8vw, 110px);
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--primary);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 9px 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(120, 231, 207, 0.1);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 10px rgba(120, 231, 207, 0); }
}

.gradient-text {
  color: transparent;
  background: linear-gradient(105deg, var(--primary), var(--secondary) 55%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
}

.typing-line {
  position: relative;
  white-space: nowrap;
}

.typing-line::after {
  display: inline-block;
  width: 4px;
  height: 0.8em;
  margin-left: 8px;
  content: "";
  background: var(--primary);
  border-radius: 3px;
  animation: blink 0.8s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-description {
  max-width: 690px;
  margin-bottom: 32px;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
}

.hero-actions,
.hero-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-socials {
  gap: 22px;
  margin-top: 34px;
}

.hero-socials a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-socials a span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  font-size: 0.68rem;
  font-weight: 800;
}

.hero-socials a:hover {
  color: var(--text);
}

.portrait-shell {
  position: relative;
  width: min(100%, 470px);
  margin-inline: auto;
}

.portrait-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 0.84;
  padding: 8px;
  border: 1px solid rgba(142, 184, 223, 0.27);
  background:
    linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
    linear-gradient(145deg, rgba(120, 231, 207, 0.8), rgba(125, 168, 255, 0.34), transparent 75%) border-box;
  border-radius: 46px;
  box-shadow: var(--shadow);
}

.portrait-frame::after {
  position: absolute;
  inset: 8px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 38px;
  pointer-events: none;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 38px;
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-solid), transparent 10%);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.floating-card strong,
.floating-card small {
  display: block;
}

.floating-card strong {
  font-size: 0.92rem;
}

.floating-card small {
  color: var(--muted);
  font-size: 0.72rem;
}

.floating-card-one {
  top: 12%;
  right: -13%;
  animation: float 5s ease-in-out infinite;
}

.floating-card-two {
  bottom: 15%;
  left: -18%;
  animation: float 6s ease-in-out 0.8s infinite;
}

.floating-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--primary);
  background: rgba(120, 231, 207, 0.1);
  border-radius: 10px;
}

@keyframes float {
  50% { transform: translateY(-8px); }
}

.portrait-tag {
  position: absolute;
  right: 23px;
  bottom: 21px;
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(4, 11, 18, 0.7);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero-orb {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}

.hero-orb-one {
  top: 10%;
  right: -6%;
  width: 470px;
  height: 470px;
  background: rgba(60, 164, 220, 0.08);
}

.hero-orb-two {
  bottom: 10%;
  left: -8%;
  width: 390px;
  height: 390px;
  background: rgba(76, 224, 187, 0.07);
}

.metrics-grid {
  display: grid;
  gap: 1px;
  margin-top: 88px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
  border-radius: 22px;
  grid-template-columns: repeat(4, 1fr);
}

.metric {
  padding: 25px 27px;
  background: var(--bg-elevated);
}

.metric strong,
.metric span {
  display: block;
}

.metric strong {
  margin-bottom: 5px;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  font-size: 1.75rem;
  letter-spacing: -0.04em;
}

.metric span {
  color: var(--muted);
  font-size: 0.83rem;
}

.two-column {
  display: grid;
  gap: clamp(50px, 10vw, 130px);
  grid-template-columns: 0.9fr 1.1fr;
}

.section-heading {
  max-width: 620px;
}

.section-heading.compact {
  margin-bottom: 58px;
}

.section-heading > p:last-child {
  max-width: 580px;
  font-size: 1.04rem;
}

.about-copy .lead {
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.52rem);
  line-height: 1.55;
}

.about-list {
  display: grid;
  gap: 0;
  margin-top: 35px;
  border-top: 1px solid var(--line);
}

.about-list > div {
  display: grid;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 38px 1fr;
}

.about-list span {
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
}

.about-list p {
  margin: 0;
}

.language-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.language-row span {
  padding: 9px 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  font-size: 0.78rem;
}

.language-row strong {
  color: var(--text);
}

.timeline {
  position: relative;
  max-width: 1020px;
  margin-inline: auto;
}

.timeline::before {
  position: absolute;
  top: 7px;
  bottom: 0;
  left: 183px;
  width: 1px;
  content: "";
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 44px;
  margin-bottom: 38px;
  grid-template-columns: 150px 1fr;
}

.timeline-period {
  padding-top: 27px;
  color: var(--faint);
  font-size: 0.81rem;
  font-weight: 700;
  text-align: right;
}

.timeline-marker {
  position: absolute;
  z-index: 1;
  top: 31px;
  left: 176px;
  width: 15px;
  height: 15px;
  border: 4px solid var(--bg);
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--primary);
}

.timeline-card,
.skill-card,
.project-card,
.education-card,
.recognition-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
}

.timeline-card {
  padding: 30px;
  border-radius: var(--radius-lg);
  transition: transform 180ms ease, border-color 180ms ease;
}

.timeline-card:hover {
  border-color: color-mix(in srgb, var(--primary), transparent 57%);
  transform: translateY(-4px);
}

.timeline-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.company {
  margin-bottom: 18px;
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 700;
}

.role-badge {
  padding: 7px 10px;
  color: var(--primary);
  border: 1px solid rgba(120, 231, 207, 0.25);
  background: rgba(120, 231, 207, 0.08);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.timeline-card ul {
  margin: 0 0 22px;
  padding-left: 20px;
  color: var(--muted);
}

.timeline-card li {
  margin-bottom: 8px;
}

.tag-row,
.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.skill-cloud span {
  padding: 6px 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
}

.projects-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}

.project-card {
  position: relative;
  min-height: 390px;
  display: flex;
  overflow: hidden;
  padding: 34px;
  border-radius: var(--radius-lg);
  transition: transform 200ms ease, border-color 200ms ease;
}

.project-card::after {
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 240px;
  height: 240px;
  content: "";
  background: radial-gradient(circle, rgba(125, 168, 255, 0.10), transparent 65%);
  border-radius: 50%;
}

.project-card:hover {
  border-color: color-mix(in srgb, var(--primary), transparent 55%);
  transform: translateY(-6px);
}

.project-featured {
  background:
    linear-gradient(135deg, rgba(120, 231, 207, 0.08), transparent 45%),
    var(--surface);
}

.project-number {
  position: absolute;
  top: 27px;
  right: 29px;
  color: var(--faint);
  font-family: "Manrope", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
}

.project-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.project-kicker {
  margin-bottom: 11px;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-card h3 {
  max-width: 85%;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.project-card p {
  max-width: 610px;
}

.project-card .tag-row {
  margin-top: auto;
  padding-top: 22px;
}

.project-highlight {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.project-highlight span {
  padding: 8px 10px;
  color: var(--text);
  border: 1px solid rgba(255, 210, 118, 0.24);
  background: rgba(255, 210, 118, 0.06);
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 700;
}

.project-links {
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.project-links a {
  color: var(--text);
  font-weight: 700;
}

.project-links a:hover {
  color: var(--primary);
}

.center-action {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

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

.skill-card {
  min-height: 235px;
  padding: 28px;
  border-radius: var(--radius-lg);
}

.skill-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 24px;
  place-items: center;
  color: var(--primary);
  border: 1px solid rgba(120, 231, 207, 0.25);
  background: rgba(120, 231, 207, 0.07);
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
}

.skill-card h3 {
  margin-bottom: 18px;
}

.education-layout {
  display: grid;
  align-items: start;
  gap: clamp(50px, 9vw, 110px);
  grid-template-columns: 0.82fr 1.18fr;
}

.education-stack {
  display: grid;
  gap: 16px;
}

.education-card,
.recognition-card {
  display: grid;
  gap: 22px;
  padding: 27px;
  border-radius: var(--radius-md);
}

.education-card {
  grid-template-columns: 112px 1fr;
}

.education-year {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
}

.education-card p,
.education-card small,
.recognition-card p {
  margin-bottom: 3px;
  color: var(--muted);
}

.education-card small {
  font-size: 0.78rem;
}

.recognition-card {
  align-items: center;
  grid-template-columns: 56px 1fr;
}

.recognition-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: var(--text);
  background: linear-gradient(145deg, rgba(125, 168, 255, 0.22), rgba(120, 231, 207, 0.12));
  border: 1px solid var(--line);
  border-radius: 14px;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
}

.contact-section {
  padding-top: 90px;
}

.contact-card {
  overflow: hidden;
  padding: clamp(34px, 7vw, 72px);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 86% 20%, rgba(125, 168, 255, 0.12), transparent 28%),
    radial-gradient(circle at 10% 90%, rgba(120, 231, 207, 0.09), transparent 30%),
    var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.contact-card h2 {
  max-width: 820px;
}

.contact-card > div:first-child > p:last-child {
  max-width: 730px;
  font-size: 1.05rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 54px;
}

.contact-links {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
  border-radius: 16px;
  grid-template-columns: repeat(2, 1fr);
}

.contact-links a {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--bg-elevated);
}

.contact-links span {
  margin-bottom: 4px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-links strong {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.contact-links a:hover strong {
  color: var(--primary);
}

.site-footer {
  padding: 25px 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner p,
.footer-inner a {
  margin: 0;
  color: var(--faint);
  font-size: 0.78rem;
}

.footer-inner a:hover {
  color: var(--text);
}

.toast {
  position: fixed;
  z-index: 1200;
  right: 24px;
  bottom: 24px;
  padding: 13px 16px;
  color: #04110e;
  background: var(--primary);
  border-radius: 12px;
  font-size: 0.83rem;
  font-weight: 800;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1);
}

.reveal-delay {
  transition-delay: 130ms;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1050px) {
  .nav-links {
    gap: 20px;
  }

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

  h1 {
    font-size: clamp(3rem, 6.6vw, 5.2rem);
  }

  .floating-card-one {
    right: -5%;
  }

  .floating-card-two {
    left: -8%;
  }

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

@media (max-width: 860px) {
  :root {
    --header-height: 70px;
  }

  .section {
    padding: 90px 0;
  }

  .brand-name {
    display: none;
  }

  .menu-toggle {
    display: grid;
    gap: 4px;
  }

  .menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 10px;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    z-index: 1001;
    top: var(--header-height);
    right: 18px;
    left: 18px;
    display: grid;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links a {
    padding: 13px 12px;
  }

  .nav-links a::after {
    display: none;
  }

  .hero {
    padding-top: calc(var(--header-height) + 70px);
  }

  .hero-grid,
  .two-column,
  .education-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 1;
  }

  .hero-visual {
    order: 0;
  }

  .portrait-shell {
    width: min(82vw, 430px);
  }

  .portrait-frame {
    aspect-ratio: 0.9;
  }

  .portrait-frame img {
    object-position: center 20%;
  }

  .floating-card-one {
    right: -6%;
  }

  .floating-card-two {
    left: -6%;
  }

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

  .timeline::before {
    left: 7px;
  }

  .timeline-item {
    gap: 0;
    padding-left: 34px;
    grid-template-columns: 1fr;
  }

  .timeline-period {
    padding: 0 0 10px;
    text-align: left;
  }

  .timeline-marker {
    top: 6px;
    left: 0;
  }

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

@media (max-width: 620px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .nav-actions .button {
    display: none;
  }

  h1 {
    font-size: clamp(2.8rem, 14vw, 4.15rem);
  }

  h2 {
    font-size: clamp(2.05rem, 10vw, 3rem);
  }

  .typing-line {
    white-space: normal;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-socials {
    gap: 12px;
  }

  .hero-socials a {
    font-size: 0;
  }

  .hero-socials a span {
    width: 38px;
    height: 38px;
    font-size: 0.7rem;
  }

  .floating-card {
    padding: 10px 12px;
  }

  .floating-card-one {
    top: 9%;
    right: -3%;
  }

  .floating-card-two {
    bottom: 13%;
    left: -3%;
  }

  .floating-card small {
    display: none;
  }

  .portrait-tag {
    right: 15px;
    bottom: 15px;
  }

  .metrics-grid,
  .skills-grid,
  .contact-links {
    grid-template-columns: 1fr;
  }

  .metric {
    padding: 21px 22px;
  }

  .timeline-card,
  .project-card,
  .skill-card {
    padding: 24px;
  }

  .timeline-top {
    flex-direction: column;
  }

  .project-card {
    min-height: 350px;
  }

  .education-card {
    gap: 7px;
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .cursor-glow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

/* =========================================================
   Hero redesign — wide, balanced and responsive
   ========================================================= */

:root {
  --container: 1520px;
}

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 58px);
  padding-bottom: 64px;
  overflow: hidden;
  background:
    radial-gradient(circle at 6% 16%, rgba(73, 210, 188, 0.095), transparent 24%),
    radial-gradient(circle at 94% 48%, rgba(76, 137, 247, 0.085), transparent 28%);
}

.hero::after {
  position: absolute;
  right: -4%;
  bottom: -100px;
  left: 28%;
  height: 245px;
  content: "";
  pointer-events: none;
  opacity: 0.38;
  background-image: radial-gradient(circle, rgba(112, 227, 207, 0.72) 1px, transparent 1.4px);
  background-size: 16px 16px;
  transform: perspective(560px) rotateX(64deg) rotateZ(-2deg);
  mask-image: linear-gradient(to right, transparent, #000 15%, #000 82%, transparent), linear-gradient(to top, #000, transparent 82%);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 82%, transparent), linear-gradient(to top, #000, transparent 82%);
}

.hero-stage {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: center;
  gap: clamp(34px, 3vw, 62px);
  grid-template-columns: minmax(430px, 1.08fr) minmax(390px, 0.9fr) minmax(300px, 0.68fr);
}

.hero-copy {
  min-width: 0;
}

.hero-name {
  display: flex;
  flex-direction: column;
  margin: 0 0 20px;
  font-size: clamp(4rem, 5.15vw, 6.1rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-name span,
.hero-name strong {
  display: block;
}

.hero-name strong {
  font-weight: 800;
}

.hero-statement {
  max-width: 690px;
  margin-bottom: 22px;
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: clamp(2.15rem, 3.35vw, 4rem);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero-description {
  max-width: 670px;
  margin-bottom: 30px;
  font-size: clamp(1rem, 1.05vw, 1.16rem);
  line-height: 1.75;
}

.hero-actions .button {
  min-height: 56px;
  padding-inline: 26px;
  border-radius: 15px;
}

.hero-actions .button svg,
.resume-download svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.button-primary {
  background: linear-gradient(105deg, #7af0d6 0%, #8be7e1 48%, #b080ff 100%);
}

html[data-theme="light"] .button-primary {
  color: #07111f;
  background: linear-gradient(105deg, #55d6be 0%, #61c8e2 50%, #8d64ea 100%);
}

.resume-download {
  background: rgba(12, 28, 47, 0.62);
}

html[data-theme="light"] .resume-download {
  background: rgba(255, 255, 255, 0.64);
}

.hero-socials {
  margin-top: 28px;
}

.portrait-shell {
  width: min(100%, 470px);
}

.portrait-frame {
  aspect-ratio: 0.79;
  padding: 6px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
    linear-gradient(145deg, rgba(120, 231, 207, 0.95), rgba(125, 168, 255, 0.5) 48%, rgba(200, 156, 255, 0.95)) border-box;
  border-radius: 35px;
}

.portrait-frame::after {
  inset: 6px;
  border-radius: 29px;
}

.portrait-frame img {
  object-position: center 18%;
  border-radius: 29px;
}

.floating-card {
  min-width: 168px;
  padding: 14px 16px;
  border-color: rgba(145, 182, 225, 0.24);
  background: rgba(11, 29, 49, 0.93);
}

html[data-theme="light"] .floating-card {
  background: rgba(255, 255, 255, 0.94);
}

.floating-card-one {
  top: 10%;
  right: -17%;
}

.floating-card-two {
  bottom: 20%;
  left: -17%;
}

.floating-icon svg,
.portrait-tag svg,
.metric-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.trophy-icon {
  color: var(--warning);
  background: rgba(255, 210, 118, 0.1);
}

.portrait-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  right: 17px;
  bottom: 17px;
  padding: 9px 12px;
}

.portrait-tag svg {
  width: 14px;
  height: 14px;
}

.metrics-panel {
  overflow: hidden;
  border: 1px solid rgba(145, 182, 225, 0.21);
  background:
    linear-gradient(145deg, rgba(16, 37, 62, 0.84), rgba(7, 19, 34, 0.88));
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

html[data-theme="light"] .metrics-panel {
  background: rgba(255, 255, 255, 0.77);
}

.metric-row {
  display: grid;
  align-items: center;
  gap: 18px;
  min-height: 120px;
  padding: 22px 26px;
  grid-template-columns: 58px 1fr;
}

.metric-row + .metric-row {
  border-top: 1px solid var(--line);
}

.metric-row > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.metric-row strong {
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: clamp(1.65rem, 2vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.metric-row span:not(.metric-icon) {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.91rem;
}

.metric-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  color: var(--primary);
  border: 1px solid rgba(120, 231, 207, 0.25);
  background: rgba(120, 231, 207, 0.08);
  border-radius: 50%;
}

.metric-icon.blue {
  color: #67b8ff;
  border-color: rgba(103, 184, 255, 0.25);
  background: rgba(103, 184, 255, 0.08);
}

.metric-icon.purple {
  color: #b67aff;
  border-color: rgba(182, 122, 255, 0.25);
  background: rgba(182, 122, 255, 0.09);
}

.hero-orb-one {
  top: 4%;
  right: 13%;
}

.hero-orb-two {
  bottom: 2%;
  left: -5%;
}

/* Remove legacy bottom metrics from the earlier hero layout if cached HTML is mixed. */
.hero > .metrics-grid {
  display: none;
}

@media (max-width: 1320px) {
  .hero-stage {
    gap: 32px;
    grid-template-columns: minmax(380px, 1.06fr) minmax(340px, 0.9fr) minmax(265px, 0.65fr);
  }

  .hero-name {
    font-size: clamp(3.6rem, 5.1vw, 5.3rem);
  }

  .hero-statement {
    font-size: clamp(2rem, 3vw, 3.35rem);
  }

  .floating-card-one {
    right: -7%;
  }

  .floating-card-two {
    left: -8%;
  }

  .metric-row {
    min-height: 108px;
    padding-inline: 20px;
    grid-template-columns: 50px 1fr;
  }

  .metric-icon {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 1100px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + 70px);
    padding-bottom: 90px;
  }

  .hero-stage {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.88fr);
  }

  .metrics-panel {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, 1fr);
  }

  .metric-row {
    min-height: 110px;
  }

  .metric-row + .metric-row {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 860px) {
  .hero-stage {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 1;
    text-align: center;
  }

  .hero-visual {
    order: 0;
  }

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

  .metric-row:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .metric-row:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .availability-pill,
  .hero-actions,
  .hero-socials {
    justify-content: center;
  }

  .hero-description,
  .hero-statement {
    margin-inline: auto;
  }

  .hero-name {
    align-items: center;
  }

  .hero::after {
    left: 0;
  }
}

@media (max-width: 620px) {
  .hero {
    padding-top: calc(var(--header-height) + 48px);
  }

  .hero-name {
    font-size: clamp(3rem, 15vw, 4.15rem);
  }

  .hero-statement {
    font-size: clamp(1.8rem, 9vw, 2.55rem);
  }

  .availability-pill {
    max-width: 100%;
    text-align: left;
  }

  .portrait-shell {
    width: min(87vw, 410px);
  }

  .floating-card {
    min-width: auto;
  }

  .floating-card-one {
    right: -2%;
  }

  .floating-card-two {
    left: -2%;
  }

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

  .metric-row + .metric-row,
  .metric-row:nth-child(3),
  .metric-row:nth-child(4) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric-row {
    min-height: 96px;
    padding: 18px 20px;
  }

  .hero-actions .button {
    width: 100%;
  }
}
