:root {
  --bg: #06100d;
  --bg-elevated: #0a1713;
  --bg-card: rgba(13, 29, 24, 0.78);
  --surface: #10221c;
  --surface-strong: #163329;
  --text: #ecfff7;
  --muted: #94aa9f;
  --faint: #5e746a;
  --line: rgba(159, 255, 211, 0.14);
  --line-strong: rgba(159, 255, 211, 0.35);
  --accent: #72f6b1;
  --accent-strong: #23d98a;
  --accent-2: #5fb6ff;
  --warning: #f8c45c;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
  --radius: 20px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  --bg: #f3f8f5;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.82);
  --surface: #e4efe9;
  --surface-strong: #d7e9df;
  --text: #0d2018;
  --muted: #496459;
  --faint: #70867b;
  --line: rgba(13, 86, 55, 0.13);
  --line-strong: rgba(13, 86, 55, 0.28);
  --accent: #08794b;
  --accent-strong: #05633d;
  --accent-2: #146c9b;
  --shadow: 0 25px 60px rgba(37, 83, 61, 0.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(31, 215, 136, 0.11), transparent 28rem),
    radial-gradient(circle at 92% 30%, rgba(80, 169, 255, 0.08), transparent 28rem),
    var(--bg);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 78%);
}
button, input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
::selection { color: #03110b; background: var(--accent); }

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 1000; transform: translateY(-150%);
  padding: .75rem 1rem; border-radius: 10px; color: #04140c; background: var(--accent); font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }
.noise {
  position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}
.cursor-glow {
  position: fixed; width: 420px; height: 420px; border-radius: 50%; pointer-events: none; z-index: -1;
  translate: -50% -50%; background: radial-gradient(circle, rgba(75, 240, 163, .075), transparent 66%); opacity: 0; transition: opacity .3s;
}
body:hover .cursor-glow { opacity: 1; }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(18px);
}
.nav-shell { width: min(1180px, calc(100% - 40px)); height: 76px; margin: auto; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: max-content; font-family: var(--mono); font-weight: 900; letter-spacing: -.03em; }
.brand-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--accent); border-radius: 10px; color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); box-shadow: inset 0 0 20px color-mix(in srgb, var(--accent) 8%, transparent); font-size: .76rem; }
.brand-text { font-size: 1rem; }
.blink-dot { color: var(--accent); animation: blink 1s steps(1) infinite; }
.nav-links { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 2vw, 30px); margin-left: auto; }
.nav-links a { position: relative; color: var(--muted); font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -9px; height: 1px; background: var(--accent); transition: right .25s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.theme-toggle, .menu-toggle { border: 1px solid var(--line); background: var(--bg-card); cursor: pointer; }
.theme-toggle { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-left: 6px; }
.theme-icon { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-sun { display: block; }
.theme-icon-moon { display: none; }
html[data-theme="light"] .theme-icon-sun { display: none; }
html[data-theme="light"] .theme-icon-moon { display: block; }
.menu-toggle { display: none; margin-left: auto; width: 44px; height: 42px; border-radius: 12px; padding: 10px; }
.menu-toggle span { display: block; height: 2px; margin: 4px 0; background: currentColor; border-radius: 3px; transition: transform .25s, opacity .25s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.section { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 118px 0; }
.section-alt { position: relative; }
.section-alt::before { content: ""; position: absolute; z-index: -1; inset: 24px calc((min(1180px, 100vw - 40px) - 100vw) / 2); border-block: 1px solid var(--line); background: color-mix(in srgb, var(--bg-elevated) 68%, transparent); }
.hero { min-height: 100svh; padding-top: 156px; padding-bottom: 72px; display: grid; align-content: center; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(42px, 7vw, 94px); align-items: center; }
.eyebrow, .section-index, .card-label, .project-meta, .role-time, .form-status { font-family: var(--mono); text-transform: uppercase; letter-spacing: .09em; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 22px; color: var(--accent); font-size: .75rem; font-weight: 800; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent), 0 0 22px var(--accent); animation: pulse 1.8s ease-in-out infinite; }
.terminal-line { min-height: 1.7em; margin: 0 0 14px; color: var(--muted); font-family: var(--mono); font-size: clamp(.84rem, 1.4vw, 1rem); }
.prompt { color: var(--accent-2); }
.terminal-caret { color: var(--accent); animation: blink .85s steps(1) infinite; }
h1, h2, h3, h4, p { margin-top: 0; }
.hero h1 { max-width: 760px; margin-bottom: 18px; font-size: clamp(3.2rem, 7vw, 6.75rem); line-height: .93; letter-spacing: -.07em; }
.hero h1 span, .section-heading h2 span, .contact-copy h2 span { color: var(--accent); text-shadow: 0 0 30px color-mix(in srgb, var(--accent) 18%, transparent); }
.hero h2 { margin-bottom: 22px; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.45rem); font-weight: 600; letter-spacing: -.02em; }
.slash { color: var(--accent-2); padding: 0 .4rem; }
.hero-summary { max-width: 680px; margin-bottom: 30px; color: var(--muted); font-size: 1.04rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 21px; border: 1px solid var(--line-strong); border-radius: 12px; font-family: var(--mono); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; transition: transform .2s, border-color .2s, background .2s, color .2s, box-shadow .2s; }
.button:hover { transform: translateY(-3px); }
.button-primary { color: #03150c; border-color: var(--accent); background: var(--accent); box-shadow: 0 13px 34px color-mix(in srgb, var(--accent) 16%, transparent); }
.button-primary:hover { background: var(--accent-strong); box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 22%, transparent); }
.button-secondary { color: var(--text); background: var(--bg-card); }
.button-secondary:hover { color: var(--accent); border-color: var(--accent); }
.social-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; }
.social-row a { color: var(--muted); font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid transparent; }
.social-row a:hover { color: var(--accent); border-color: var(--accent); }

.terminal-card { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 22px; background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--bg-elevated) 86%, transparent)); box-shadow: var(--shadow); transform: perspective(1000px) rotateY(-2deg) rotateX(1deg); }
.terminal-card::before { content: ""; position: absolute; inset: -1px; pointer-events: none; border-radius: inherit; background: linear-gradient(130deg, color-mix(in srgb, var(--accent) 25%, transparent), transparent 35%, color-mix(in srgb, var(--accent-2) 15%, transparent)); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; padding: 1px; }
.terminal-topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 58%, transparent); font-family: var(--mono); font-size: .7rem; }
.traffic-lights { display: flex; gap: 6px; }
.traffic-lights span { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.traffic-lights span:nth-child(1) { background: #ff6b6b; }.traffic-lights span:nth-child(2) { background: #ffd166; }.traffic-lights span:nth-child(3) { background: #70e39b; }
.terminal-topbar p { margin: 0; color: var(--muted); }
.terminal-state { justify-self: end; color: var(--accent); }
.terminal-body { position: relative; padding: 26px; }
.avatar-orbit { position: relative; width: 148px; height: 148px; margin: 2px auto 24px; display: grid; place-items: center; }
.avatar-core { position: relative; z-index: 3; display: grid; place-items: center; width: 104px; height: 104px; overflow: hidden; border: 2px solid var(--accent); border-radius: 30px; color: var(--accent); background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 22%, transparent), var(--bg-elevated) 70%); box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 16%, transparent); font-family: var(--mono); font-size: 1.6rem; font-weight: 900; }
.profile-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; opacity: 0; transition: opacity .3s ease; }
.avatar-core.has-photo .profile-photo { opacity: 1; }
.avatar-core.has-photo .avatar-initials { opacity: 0; }
.avatar-initials { transition: opacity .2s ease; }
.orbit { position: absolute; inset: 6px; border: 1px dashed color-mix(in srgb, var(--accent) 34%, transparent); border-radius: 50%; animation: spin 14s linear infinite; }
.orbit::before { content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.orbit-b { inset: 22px; border-color: color-mix(in srgb, var(--accent-2) 35%, transparent); animation-direction: reverse; animation-duration: 9s; }
.orbit-b::before { background: var(--accent-2); box-shadow: 0 0 14px var(--accent-2); }
pre { margin: 0; overflow-x: auto; color: var(--muted); font-family: var(--mono); font-size: clamp(.68rem, 1.25vw, .82rem); line-height: 1.8; }
.code-key { color: var(--accent-2); }.code-string { color: var(--accent); }.code-number { color: var(--warning); }
.terminal-footer { display: flex; justify-content: space-between; gap: 14px; margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--faint); font-family: var(--mono); font-size: .65rem; text-transform: uppercase; }
.terminal-footer span:first-child { color: var(--accent); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 64px; }
.stats-grid article { padding: 19px 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--bg-card); backdrop-filter: blur(10px); }
.stats-grid strong { display: block; color: var(--accent); font-family: var(--mono); font-size: 1.55rem; }
.stats-grid span { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }

.section-heading { max-width: 770px; margin-bottom: 52px; }
.section-index { margin-bottom: 12px; color: var(--accent); font-size: .76rem; font-weight: 900; }
.section-heading h2, .contact-copy h2 { margin-bottom: 14px; font-size: clamp(2.25rem, 5vw, 4.2rem); line-height: 1.05; letter-spacing: -.055em; }
.section-heading > p:last-child, .contact-copy > p { color: var(--muted); max-width: 650px; }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
.about-card, .focus-card, .skill-card, .project-card, .leadership-card, .contact-shell { border: 1px solid var(--line); background: var(--bg-card); backdrop-filter: blur(12px); box-shadow: 0 12px 35px rgba(0,0,0,.08); }
.about-card, .focus-card { border-radius: var(--radius); padding: clamp(26px, 4vw, 42px); }
.card-label { margin-bottom: 23px; color: var(--accent); font-size: .68rem; }
.about-card p { color: var(--muted); font-size: 1.04rem; }
.about-card p:last-child { margin-bottom: 0; }
.focus-item { display: grid; grid-template-columns: 42px 1fr; gap: 16px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.focus-item:last-child { border-bottom: 0; padding-bottom: 0; }
.focus-item > span { color: var(--accent); font-family: var(--mono); font-size: .74rem; }
.focus-item h3 { margin-bottom: 5px; font-size: 1rem; }
.focus-item p { margin: 0; color: var(--muted); font-size: .9rem; }

.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill-card { position: relative; overflow: hidden; min-height: 245px; border-radius: 18px; padding: 28px; transition: transform .25s, border-color .25s; }
.skill-card::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 0 0 18px color-mix(in srgb, var(--line) 35%, transparent); }
.skill-card:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.skill-icon { display: inline-grid; place-items: center; min-width: 48px; height: 42px; padding: 0 10px; margin-bottom: 26px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); font-family: var(--mono); font-size: .73rem; font-weight: 900; }
.skill-card h3 { margin-bottom: 18px; font-size: 1.1rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud span { display: inline-flex; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: color-mix(in srgb, var(--surface) 70%, transparent); font-family: var(--mono); font-size: .67rem; }
.tag-cloud.compact span { padding: 5px 8px; font-size: .63rem; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-button { padding: 9px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--bg-card); font-family: var(--mono); font-size: .69rem; text-transform: uppercase; cursor: pointer; transition: all .2s; }
.filter-button:hover, .filter-button.active { color: #04150c; border-color: var(--accent); background: var(--accent); }
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project-card { position: relative; overflow: hidden; min-height: 330px; padding: 30px; border-radius: var(--radius); transition: transform .25s, border-color .25s, opacity .25s; }
.project-card:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.project-card.hidden { display: none; }
.project-featured { grid-column: 1 / -1; min-height: auto; padding: 0; display: grid; grid-template-columns: .9fr 1.1fr; }
.project-visual { position: relative; min-height: 410px; overflow: hidden; border-right: 1px solid var(--line); background: #071511; }
.map-grid { position: absolute; inset: -10%; background-image: linear-gradient(rgba(99,246,177,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(99,246,177,.1) 1px, transparent 1px); background-size: 33px 33px; transform: perspective(500px) rotateX(55deg) scale(1.35); transform-origin: center bottom; }
.charge-route { position: absolute; height: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); filter: drop-shadow(0 0 8px var(--accent)); transform-origin: left; }
.route-a { width: 70%; top: 40%; left: 12%; transform: rotate(18deg); }.route-b { width: 54%; top: 67%; left: 20%; transform: rotate(-24deg); }
.charge-node { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--accent); border-radius: 50%; color: #071511; background: var(--accent); box-shadow: 0 0 0 10px rgba(99,246,177,.09), 0 0 30px rgba(99,246,177,.35); animation: nodepulse 2.2s ease-in-out infinite; }
.node-a { left: 15%; top: 35%; }.node-b { right: 20%; top: 49%; animation-delay: .6s; }.node-c { left: 43%; bottom: 16%; animation-delay: 1.2s; }
.project-code { position: absolute; left: 25px; bottom: 22px; color: var(--accent); font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; }
.project-content { padding: clamp(30px, 5vw, 55px); align-self: center; }
.project-meta { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 18px; color: var(--faint); font-size: .64rem; }
.project-meta span:last-child { color: var(--accent); }
.project-card h3 { margin-bottom: 8px; font-size: clamp(1.45rem, 3vw, 2.3rem); letter-spacing: -.035em; }
.project-subtitle { color: var(--accent); font-family: var(--mono); font-size: .78rem; }
.project-card > p:not(.project-subtitle), .project-content > p:not(.project-subtitle) { color: var(--muted); }
.project-number { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 28px; border: 1px solid var(--line); border-radius: 12px; color: var(--accent); font-family: var(--mono); font-size: .77rem; }
.project-links { display: flex; gap: 16px; margin-top: 24px; }
.project-links a { color: var(--accent); font-family: var(--mono); font-size: .72rem; text-transform: uppercase; border-bottom: 1px solid transparent; }
.project-links a:hover { border-color: var(--accent); }

.timeline { position: relative; max-width: 940px; }
.timeline::before { content: ""; position: absolute; left: 188px; top: 10px; bottom: 0; width: 1px; background: linear-gradient(var(--accent), var(--line)); }
.timeline-item { position: relative; display: grid; grid-template-columns: 160px 1fr; gap: 58px; min-height: 180px; padding-bottom: 38px; }
.timeline-marker { position: absolute; left: 182px; top: 5px; width: 13px; height: 13px; border: 2px solid var(--accent); border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 9%, transparent); }
.timeline-date { padding-top: 1px; color: var(--accent); font-family: var(--mono); font-size: .74rem; text-align: right; }
.timeline-content { padding: 0 0 24px 0; }
.timeline-status { display: inline-flex; padding: 4px 8px; margin-bottom: 10px; border-radius: 6px; color: #04150c; background: var(--accent); font-family: var(--mono); font-size: .58rem; font-weight: 900; }
.timeline-content h3 { margin-bottom: 4px; font-size: 1.28rem; }
.timeline-content h4 { margin-bottom: 16px; color: var(--muted); font-size: .94rem; font-weight: 500; }
.education-metrics { display: flex; flex-wrap: wrap; gap: 12px; }
.education-metrics span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-family: var(--mono); font-size: .67rem; }
.education-metrics strong { color: var(--text); }
.degree-progress { max-width: 560px; margin-top: 18px; }
.degree-progress-copy { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 8px; color: var(--muted); font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }
.degree-progress-copy strong { color: var(--accent); }
.degree-progress-track { height: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.degree-progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.study-plan { margin-top: 22px; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
.study-plan-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.study-plan-heading .card-label { margin-bottom: 8px; }
.study-plan-heading h3 { margin: 0; font-size: clamp(1.45rem, 3vw, 2.15rem); letter-spacing: -.035em; }
.study-plan-heading > p { max-width: 290px; margin: 0; color: var(--muted); font-family: var(--mono); font-size: .72rem; text-align: right; }
.study-plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.study-plan-grid > article { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface) 65%, transparent); }
.study-plan-term { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--accent); font-family: var(--mono); font-size: .72rem; text-transform: uppercase; }
.course-list { margin: 0; padding: 0; list-style: none; }
.course-list li { display: grid; grid-template-columns: 86px 1fr 22px; gap: 12px; align-items: start; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.course-list li:last-child { border-bottom: 0; }
.course-list span, .course-list em { color: var(--faint); font-family: var(--mono); font-size: .65rem; font-style: normal; }
.course-list strong { color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1.35; }
.course-list em { text-align: right; }
.study-plan-note { margin: 20px 0 0; color: var(--faint); font-size: .76rem; }

.leadership-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.leadership-card { min-height: 270px; padding: 32px; border-radius: var(--radius); transition: transform .25s, border-color .25s; }
.leadership-card:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.role-time { color: var(--accent); font-size: .66rem; }
.leadership-card h3 { margin-bottom: 4px; font-size: 1.35rem; }
.leadership-card h4 { margin-bottom: 18px; color: var(--accent-2); font-size: .86rem; }
.leadership-card > p:last-child { color: var(--muted); }
.language-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); overflow: hidden; }
.language-strip div { padding: 26px; border-right: 1px solid var(--line); }
.language-strip div:last-child { border-right: 0; }
.language-strip span { display: block; margin-bottom: 7px; color: var(--accent); font-family: var(--mono); font-size: .62rem; }
.language-strip strong { display: block; font-size: 1rem; }
.language-strip p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }

.contact-section { padding-bottom: 70px; }
.contact-shell { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(36px, 6vw, 80px); padding: clamp(30px, 6vw, 70px); border-radius: 26px; background:
  linear-gradient(125deg, color-mix(in srgb, var(--accent) 7%, var(--bg-card)), var(--bg-card) 58%);
}
.contact-list { display: grid; gap: 10px; margin-top: 34px; }
.contact-list a, .contact-list div { display: flex; flex-direction: column; gap: 3px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.contact-list span { color: var(--accent); font-family: var(--mono); font-size: .6rem; }
.contact-list strong { font-size: .9rem; font-weight: 600; }
.copy-email { margin-top: 18px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--accent); background: transparent; font-family: var(--mono); font-size: .67rem; cursor: pointer; }
.copy-email:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.contact-form { display: grid; gap: 16px; }
.form-status { color: var(--accent); font-size: .65rem; }
.contact-form label { display: grid; gap: 7px; color: var(--muted); font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; }
.contact-form input, .contact-form textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--text); background: color-mix(in srgb, var(--bg) 70%, transparent); font-family: var(--sans); font-size: .9rem; resize: vertical; transition: border-color .2s, box-shadow .2s; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.contact-form .button { width: 100%; border-width: 0; cursor: pointer; }
.form-note { margin: -4px 0 0; color: var(--faint); font-size: .7rem; }

.site-footer { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 35px 0 48px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 28px; color: var(--muted); font-size: .75rem; }
.footer-brand { margin-bottom: 8px; }.site-footer p { margin: 0; }.site-footer > a { color: var(--accent); font-family: var(--mono); }
.toast { position: fixed; z-index: 500; right: 22px; bottom: 22px; max-width: calc(100% - 44px); padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 10px; color: #04150c; background: var(--accent); box-shadow: var(--shadow); font-family: var(--mono); font-size: .72rem; font-weight: 800; opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translateY(0); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .11s; }.delay-2 { transition-delay: .2s; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { transform: scale(.75); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 5%, transparent), 0 0 8px var(--accent); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes nodepulse { 50% { transform: scale(1.12); box-shadow: 0 0 0 14px rgba(99,246,177,.04), 0 0 45px rgba(99,246,177,.5); } }

@media (max-width: 980px) {
  .nav-shell { width: min(100% - 28px, 1180px); }
  .menu-toggle { display: block; }
  .nav-links { position: fixed; top: 76px; left: 14px; right: 14px; display: grid; gap: 0; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-elevated); box-shadow: var(--shadow); opacity: 0; transform: translateY(-12px); pointer-events: none; transition: opacity .2s, transform .2s; }
  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links a { padding: 13px 10px; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a::after { display: none; }
  .theme-toggle { margin-left: 0; }
  .hero-grid, .about-grid, .contact-shell { grid-template-columns: 1fr; }
  .hero-panel { max-width: 650px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .project-featured { grid-template-columns: 1fr; }
  .study-plan-grid { grid-template-columns: 1fr; }
  .project-visual { min-height: 340px; border-right: 0; border-bottom: 1px solid var(--line); }
  .site-footer { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 680px) {
  .section { width: min(100% - 28px, 1180px); padding: 88px 0; }
  .hero { padding-top: 130px; }
  .hero h1 { font-size: clamp(3rem, 16vw, 4.8rem); }
  .hero-actions .button { width: 100%; }
  .stats-grid, .skills-grid, .projects-grid, .leadership-grid, .language-strip { grid-template-columns: 1fr; }
  .stats-grid { margin-top: 38px; }
  .project-featured { grid-column: auto; }
  .project-visual { min-height: 300px; }
  .language-strip div { border-right: 0; border-bottom: 1px solid var(--line); }
  .language-strip div:last-child { border-bottom: 0; }
  .timeline::before { left: 7px; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; padding-left: 34px; }
  .timeline-marker { left: 1px; }
  .timeline-date { text-align: left; }
  .study-plan-heading { align-items: start; flex-direction: column; gap: 8px; }
  .study-plan-heading > p { text-align: left; }
  .course-list li { grid-template-columns: 78px 1fr 18px; gap: 8px; padding: 12px; }
  .contact-shell { padding: 26px 20px; }
  .terminal-body { padding: 20px; }
  .terminal-footer { flex-direction: column; }
  .site-footer { width: min(100% - 28px, 1180px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
}

/* Keep mobile content within the viewport, including intrinsic grid widths. */
html { overflow-x: clip; }
body, main, section { max-width: 100%; }
img, video, canvas, svg { max-width: 100%; }
.hero-grid > *, .about-grid > *, .contact-shell > *,
.projects-grid > *, .skills-grid > *, .leadership-grid > *, .repo-shelf > *, .timeline-item > *, .focus-item > * { min-width: 0; }
.contact-form input, .contact-form textarea { min-width: 0; }
.project-meta, .project-links { flex-wrap: wrap; }
.contact-list strong { overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .section-alt::before { inset-inline: -14px; }
  .terminal-card { transform: none; }
  .contact-form input, .contact-form textarea { font-size: 16px; }
  .nav-shell { gap: 12px; }
  .theme-toggle, .menu-toggle { flex-shrink: 0; }
}
@media (hover: none) and (pointer: coarse) {
  .cursor-glow { display: none; }
}
