:root {
  color-scheme: dark;
  --background: #070914;
  --surface: #0e1426;
  --surface-raised: #111a30;
  --border: #202b49;
  --text: #f0f3ff;
  --muted: #9aa6c8;
  --blue: #347dff;
  --cyan: #25c6e8;
  --font-sans: "DM Sans", sans-serif;
  --font-mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 82% 10%, rgb(38 80 165 / 10%), transparent 30rem),
    var(--background);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.section-shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 max(32px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid rgb(32 43 73 / 65%);
  background: rgb(7 9 20 / 88%);
  backdrop-filter: blur(18px);
}
.wordmark { display: inline-flex; align-items: center; gap: 12px; }
.wordmark-mark, .footer-mark { color: var(--text); font-size: 25px; font-weight: 800; letter-spacing: -2px; }
.wordmark-mark span, .footer-mark span { color: var(--cyan); }
.wordmark-name { font-size: 14px; font-weight: 700; }
.wordmark-name span { margin-left: 5px; color: var(--muted); font-weight: 400; }
.site-navigation { display: flex; align-items: center; gap: clamp(18px, 3vw, 38px); }
.site-navigation a { color: var(--muted); font-size: 14px; transition: color 160ms ease; }
.site-navigation a:hover, .site-navigation a:focus-visible { color: var(--cyan); }
.menu-toggle { display: none; }

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(250px, .85fr); gap: 30px; align-items: center; min-height: 700px; padding-block: 94px 105px; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow, .card-kicker { color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; color: #b6c3e6; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px rgb(37 198 232 / 75%); animation: status-glow 2s ease-in-out infinite; }
@keyframes status-glow { 50% { box-shadow: 0 0 3px rgb(37 198 232 / 45%); } }
.hero-greeting { margin: 34px 0 1px; color: var(--muted); font-size: clamp(21px, 2.2vw, 27px); }
.hero h1 { margin: 0; font-size: clamp(42px, 5.3vw, 68px); font-weight: 800; line-height: 1.08; letter-spacing: -.055em; }
.hero h1 > span { color: var(--blue); }
.hero-description { max-width: 550px; margin: 18px 0 26px; color: var(--muted); font-size: clamp(17px, 2vw, 22px); line-height: 1.65; }
.code-card { max-width: 630px; overflow: hidden; padding: 17px 22px 19px; border: 1px solid var(--border); border-radius: 17px; background: rgb(4 7 17 / 82%); box-shadow: 0 16px 55px rgb(0 0 0 / 18%); }
.code-label { display: flex; justify-content: space-between; color: #647193; font-family: var(--font-mono); font-size: 9px; letter-spacing: .13em; }
.code-label > span { color: var(--blue); font-size: 8px; letter-spacing: .2em; }
.code-card pre { overflow-x: auto; margin: 13px 0 0; color: #d3ddf8; font: 14px/1.8 var(--font-mono); }
.code-cyan { color: var(--cyan); }
.code-blue { color: #75baff; }
.cursor { display: inline-block; width: 8px; height: 17px; margin-left: 4px; background: var(--cyan); vertical-align: -3px; animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 26px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 14px; padding: 0 22px; border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 700; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--blue); color: white; box-shadow: 0 8px 26px rgb(52 125 255 / 20%); }
.button-primary:hover { background: #4b8aff; }
.button-secondary { border-color: var(--blue); background: transparent; color: var(--cyan); }
.button-secondary:hover { background: rgb(52 125 255 / 9%); }
.hero-aside { position: relative; display: grid; grid-template-rows: 1fr auto; min-height: 490px; place-items: center; overflow: hidden; }
.aside-orbit { position: absolute; width: 340px; height: 340px; border: 1px solid rgb(52 125 255 / 18%); border-radius: 50%; animation: orbit-turn 28s linear infinite; }
.orbit-two { width: 270px; height: 270px; border-color: rgb(37 198 232 / 17%); animation-direction: reverse; animation-duration: 22s; }
@keyframes orbit-turn { to { transform: rotate(360deg); } }
.portrait-switch { position: relative; z-index: 1; display: grid; width: min(100%, 340px); aspect-ratio: 1; place-items: center; overflow: hidden; padding: 0; border: 1px solid #2b3c64; border-radius: 50%; background: linear-gradient(155deg, #172341, #0d1324); box-shadow: 0 25px 75px rgb(0 0 0 / 35%), 0 0 55px rgb(52 125 255 / 12%); cursor: pointer; touch-action: pan-y; }
.portrait-switch::after { position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgb(5 8 18 / 70%)); content: ""; pointer-events: none; }
.portrait-image { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; transform: scale(1.16) translateX(7%) translateY(-2%); transition: opacity 180ms ease, transform 500ms ease; }
.portrait-switch:hover .portrait-image { transform: scale(1.2) translateX(7%) translateY(-2%); }
.portrait-switch.is-logo { padding: 0; border-color: transparent; outline: 1px solid rgb(240 243 255 / 75%); outline-offset: 8px; background: transparent; box-shadow: none; }
.portrait-switch.is-logo::after { display: none; }
.portrait-switch.is-logo .portrait-image { object-fit: contain; object-position: center; transform: none; }
.portrait-swipe-hint { position: relative; z-index: 2; margin-top: 13px; color: var(--text); font: 9px var(--font-mono); letter-spacing: .15em; text-align: center; }

.section-space { padding-block: 70px; }
.about-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(30px, 8vw, 100px); align-items: start; border-top: 1px solid rgb(32 43 73 / 65%); }
.about-heading .eyebrow { color: var(--cyan); }
.about-title { margin: 15px 0 0; font-size: clamp(32px, 4vw, 47px); line-height: 1.12; letter-spacing: -.055em; }
.about-title span { color: var(--blue); }
.about-copy { max-width: 650px; padding-top: 12px; }
.about-copy p { margin: 0 0 18px; color: var(--muted); font-size: 16px; line-height: 1.85; }
.about-copy strong { color: var(--text); font-weight: 700; }
.about-link { display: inline-flex; align-items: center; gap: 11px; margin-top: 4px; color: var(--cyan); font-size: 14px; font-weight: 700; }
.about-link:hover { color: #87eaff; }
.section-heading { display: flex; align-items: center; gap: 17px; margin-bottom: 23px; }
.section-number { color: var(--cyan); font-size: 34px; font-weight: 800; letter-spacing: -.05em; }
.section-number span { color: var(--blue); }
.section-heading .eyebrow { display: block; margin-bottom: 3px; }
.section-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.045em; }
.section-intro { margin: 0 0 25px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.section-intro span { color: var(--cyan); }
.education-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.info-card { position: relative; border: 1px solid var(--border); border-left: 4px solid var(--blue); border-radius: 17px; background: var(--surface); transition: transform 180ms ease, border-color 180ms ease; }
.info-card:hover { transform: translateY(-3px); border-color: #304477; }
.education-card { min-height: 207px; padding: 23px 24px; }
.education-card.is-current { border-left-color: var(--cyan); background: linear-gradient(130deg, #101c34, var(--surface) 65%); }
.card-topline { display: flex; align-items: center; justify-content: space-between; }
.card-kicker { font-size: 9px; }
.card-icon { color: #3c527e; font: 14px var(--font-mono); }
.education-card h3, .profile-card h3 { margin: 23px 0 5px; font-size: 21px; letter-spacing: -.025em; }
.education-card p, .profile-card p, .coming-panel p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.skills-intro { margin: -8px 0 22px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skill-card { display: flex; min-height: 120px; align-items: center; gap: 16px; padding: 21px; }
.skill-icon { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border: 1px solid #25385e; border-radius: 13px; background: #121d37; }
.skill-icon img { display: block; width: 33px; height: 33px; object-fit: contain; }
.skill-icon-js img { width: 36px; height: 36px; }
.skill-card h3 { margin: 5px 0 3px; font-size: 18px; }
.skill-card p { margin: 0; color: var(--muted); font-size: 13px; }
.skill-card .pill { margin: 0 0 0 auto; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 7px 12px; border: 1px solid #263454; border-radius: 999px; background: #151f39; color: #aab8d9; font-size: 12px; }
.pill-current { border-color: rgb(37 198 232 / 25%); background: rgb(37 198 232 / 9%); color: #83e3f5; }
.pill-current .status-dot { width: 6px; height: 6px; }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.profile-card { display: flex; min-height: 112px; align-items: center; gap: 16px; padding: 21px; }
.profile-mark { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border: 1px solid #25385e; border-radius: 12px; background: #121d37; color: var(--cyan); font: 700 14px var(--font-mono); }
.profile-card h3 { margin: 0 0 4px; font-size: 17px; }
.profile-card p { font-size: 13px; }
.profile-arrow { margin-left: auto; color: #7885a8; font-size: 18px; }
.coming-panel { display: flex; min-height: 160px; align-items: center; gap: 20px; padding: 27px; border: 1px solid var(--border); border-left: 4px solid var(--blue); border-radius: 17px; background: var(--surface); }
.coming-symbol { display: grid; width: 55px; height: 55px; flex: 0 0 auto; place-items: center; border: 1px solid #25385e; border-radius: 15px; background: #121d37; color: var(--cyan); font: 18px var(--font-mono); }
.coming-panel h3 { margin: 0 0 5px; font-size: 20px; }
.coming-panel .pill { margin: 0 0 0 auto; white-space: nowrap; }
.project-panel { border-left-color: var(--cyan); }
.contact-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.contact-detail { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 17px 19px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); color: var(--text); font-size: 14px; overflow-wrap: anywhere; }
.contact-detail:hover { border-color: #304477; }
.contact-detail-label { grid-column: 1 / -1; color: var(--muted); font: 10px var(--font-mono); letter-spacing: .12em; }
.contact-detail-arrow { color: var(--cyan); }
.contact-form { padding: 28px; border: 1px solid var(--border); border-left: 4px solid var(--blue); border-radius: 17px; background: var(--surface); }
.form-honeypot { position: absolute; width: 1px !important; height: 1px !important; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.contact-form label { display: grid; gap: 8px; margin-bottom: 17px; color: #d5def5; font-size: 14px; font-weight: 600; }
.contact-form input, .contact-form textarea { width: 100%; border: 1px solid #202b49; border-radius: 11px; outline: none; background: #070914; color: var(--text); font-size: 15px; font-weight: 400; transition: border-color 150ms ease, box-shadow 150ms ease; }
.contact-form input { min-height: 51px; padding: 0 15px; }
.contact-form textarea { min-height: 140px; padding: 14px 15px; resize: vertical; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #687493; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(52 125 255 / 13%); }
.form-footer { display: flex; align-items: center; gap: 16px; }
.form-note { margin: 0; color: #8794b7; font-size: 12px; line-height: 1.6; }
.form-note a { color: #b7c8f2; text-decoration: underline; text-underline-offset: 3px; }
.form-status { min-height: 1.5em; margin: 14px 0 0; color: var(--cyan); font-size: 13px; line-height: 1.6; }
.contact-form button:disabled { cursor: wait; opacity: .7; }
.site-footer { display: flex; min-height: 100px; align-items: center; justify-content: space-between; width: min(1120px, calc(100% - 64px)); margin-inline: auto; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.footer-mark { font-size: 22px; }
.footer-heart { color: var(--cyan); }
.back-to-top { color: #b7c3df; }
.back-to-top:hover { color: var(--cyan); }

body.motion-ready [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 650ms ease, transform 650ms cubic-bezier(.2, .75, .25, 1); }
body.motion-ready [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.education-grid [data-reveal]:nth-child(2), .profile-grid [data-reveal]:nth-child(2), .skills-grid [data-reveal]:nth-child(2) { transition-delay: 100ms; }
.education-grid [data-reveal]:nth-child(3), .profile-grid [data-reveal]:nth-child(3) { transition-delay: 190ms; }

@media (max-width: 760px) {
  html { scroll-padding-top: 83px; }
  .section-shell { width: min(100% - 40px, 560px); }
  .site-header { min-height: 66px; padding-inline: 20px; }
  .wordmark-name span { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 9px 0 9px 10px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
  .menu-toggle-icon, .menu-toggle-icon::before, .menu-toggle-icon::after { display: block; width: 19px; height: 2px; border-radius: 4px; background: var(--text); transition: transform 160ms ease; }
  .menu-toggle-icon { position: relative; }
  .menu-toggle-icon::before, .menu-toggle-icon::after { position: absolute; content: ""; }
  .menu-toggle-icon::before { transform: translateY(-6px); }
  .menu-toggle-icon::after { transform: translateY(6px); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::before { transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::after { transform: rotate(-45deg); }
  .site-navigation { position: absolute; top: 65px; right: 0; left: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 7px 20px 14px; border-bottom: 1px solid var(--border); background: #090c19; }
  .site-navigation.is-open { display: flex; }
  .site-navigation a { padding: 12px 0; border-bottom: 1px solid rgb(32 43 73 / 55%); font-size: 14px; }
  .site-navigation a:last-child { border: 0; }
  .hero { display: block; min-height: 0; padding-block: 77px 50px; }
  .hero-greeting { margin-top: 27px; }
  .hero h1 { font-size: clamp(39px, 10vw, 58px); }
  .desktop-break { display: none; }
  .hero-description { margin-block: 15px 21px; font-size: 17px; }
  .code-card { padding: 15px 16px; border-radius: 15px; }
  .code-card pre { font-size: clamp(11px, 3vw, 13px); }
  .hero-actions { gap: 10px; margin-top: 20px; }
  .button { min-height: 47px; padding-inline: 16px; font-size: 13px; }
  .hero-aside { min-height: 390px; margin-top: 40px; }
  .portrait-switch { width: min(78vw, 300px); }
  .section-space { padding-block: 43px; }
  .about-section { grid-template-columns: 1fr; gap: 16px; }
  .about-title { margin-top: 10px; font-size: 34px; }
  .about-copy { padding-top: 0; }
  .about-copy p { font-size: 15px; line-height: 1.8; }
  .section-heading { gap: 12px; margin-bottom: 18px; }
  .section-number { font-size: 29px; }
  .section-heading h2 { font-size: 25px; }
  .section-heading .eyebrow { font-size: 9px; }
  .section-intro { margin-bottom: 20px; font-size: 16px; }
  .education-grid, .profile-grid, .skills-grid { grid-template-columns: 1fr; gap: 12px; }
  .skill-card { min-height: 100px; padding: 17px; }
  .skill-card .pill { padding: 6px 9px; font-size: 10px; }
  .education-card { min-height: 0; padding: 19px 20px; }
  .education-card h3 { margin-top: 17px; }
  .education-card .pill { margin-top: 13px; }
  .profile-card { min-height: 92px; padding: 17px; }
  .coming-panel { min-height: 140px; gap: 14px; padding: 20px 16px; }
  .coming-symbol { width: 45px; height: 45px; }
  .coming-panel h3 { font-size: 17px; }
  .coming-panel p { font-size: 13px; }
  .coming-panel .pill { align-self: flex-start; margin-top: 0; padding: 6px 9px; font-size: 10px; }
  .contact-form { padding: 19px 16px; }
  .contact-details { grid-template-columns: 1fr; gap: 10px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form label { font-size: 13px; }
  .contact-form textarea { min-height: 125px; }
  .form-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
  .site-footer { width: calc(100% - 40px); min-height: 82px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  body.motion-ready [data-reveal] { opacity: 1; transform: none; }
}
