/* Puskar Dhungana — personal portfolio
   Replace the portrait by adding assets/profile.jpg. */
:root {
  color-scheme: light;
  --bg: #0b1422;
  --bg-soft: #0f1c2c;
  --surface: #132238;
  --surface-raised: #192b42;
  --surface-quiet: #101d2f;
  --text: #ecf4fb;
  --text-soft: #b6c7d8;
  --muted: #8598ad;
  --line: #2a3e55;
  --accent: #8bcaf0;
  --accent-strong: #a6dcf8;
  --accent-ink: #102033;
  --blue: #76d5de;
  --violet: #a78bfa;
  --amber: #f2b877;
  --coral: #e9959d;
  --shadow: 0 24px 60px rgb(2 9 18 / 42%);
  --header-bg: rgb(11 20 34 / 90%);
  --glow: rgb(99 192 233 / 10%);
  --violet-glow: rgb(139 92 246 / 12%);
  --amber-glow: rgb(242 184 119 / 9%);
  --coral-glow: rgb(233 149 157 / 7%);
  --page: 1160px;
  --gutter: clamp(22px, 6.1vw, 92px);
  --header-height: 76px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f8fb;
  --bg-soft: #eaf2f7;
  --surface: #fbfdff;
  --surface-raised: #ffffff;
  --surface-quiet: #e5eef5;
  --text: #14283b;
  --text-soft: #40576b;
  --muted: #5c7285;
  --line: #d1dfe9;
  --accent: #20739e;
  --accent-strong: #1c688f;
  --accent-ink: #f5fbff;
  --blue: #087e8e;
  --violet: #7555b7;
  --amber: #a76722;
  --coral: #b45165;
  --shadow: 0 24px 60px rgb(30 61 83 / 10%);
  --header-bg: rgb(244 248 251 / 92%);
  --glow: rgb(53 159 194 / 8%);
  --violet-glow: rgb(139 92 246 / 7%);
  --amber-glow: rgb(221 151 76 / 8%);
  --coral-glow: rgb(180 81 101 / 6%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 18px); }
body {
  margin: 0;
  background: radial-gradient(ellipse at 82% 7%, var(--violet-glow), transparent 30rem), radial-gradient(ellipse at 7% 30%, var(--glow), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
  -webkit-font-smoothing: antialiased;
}
body, button, input, textarea { font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif; }
::selection { color: var(--accent-ink); background: var(--accent); }
a { color: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.page-width { width: min(var(--page), calc(100% - (var(--gutter) * 2))); margin-inline: auto; }
.section { position: relative; padding: clamp(88px, 10vw, 148px) 0; }
.section-anchor { scroll-margin-top: calc(var(--header-height) + 22px); }
.skip-link { position: fixed; z-index: 1200; top: 10px; left: 10px; transform: translateY(-150%); padding: 10px 16px; color: var(--accent-ink); background: var(--accent); border-radius: 4px; font-weight: 700; }
.skip-link:focus { transform: translateY(0); }

/* Navigation */
.site-header { position: fixed; z-index: 1000; inset: 0 0 auto; height: var(--header-height); background: var(--header-bg); border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 30%); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.nav-shell { width: min(var(--page), calc(100% - (var(--gutter) * 2))); height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font: 700 10px/1 "Segoe UI", sans-serif; letter-spacing: -.04em; }
.brand-name { font-size: 16px; line-height: 1; font-weight: 650; letter-spacing: -.045em; }
.brand-dot { color: var(--blue); }
.nav-panel { display: flex; align-items: center; margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); margin: 0; padding: 0; list-style: none; }
.nav-link { position: relative; display: inline-block; padding: 8px 0; color: var(--text-soft); text-decoration: none; font-size: 12px; letter-spacing: .025em; transition: color .2s ease; }
.nav-link::after { position: absolute; right: 0; bottom: 1px; left: 0; height: 1px; background: var(--accent); content: ""; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav-link:hover, .nav-link.is-active { color: var(--text); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle, .menu-toggle { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; transition: border-color .2s ease, color .2s ease, background-color .2s ease; }
.theme-toggle:hover, .menu-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-icon, .menu-icon { width: 17px; height: 17px; display: block; background: currentColor; mask-size: contain; mask-repeat: no-repeat; mask-position: center; }
.theme-icon { background: var(--accent); }
html[data-theme="dark"] .theme-icon { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='3.8'/%3E%3Cpath d='M12 2v2m0 16v2M4.93 4.93l1.42 1.42m11.3 11.3 1.42 1.42M2 12h2m16 0h2M4.93 19.07l1.42-1.42m11.3-11.3 1.42-1.42'/%3E%3C/svg%3E"); }
html[data-theme="light"] .theme-icon { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.3 15.2A8.3 8.3 0 0 1 8.8 3.7 8.5 8.5 0 1 0 20.3 15.2Z'/%3E%3C/svg%3E"); }
.menu-toggle { display: none; }
.menu-icon { width: 16px; height: 16px; background: var(--text); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E"); }
.nav-mobile-actions { display: none; }

/* Hero */
.hero { position: relative; min-height: min(900px, 100svh); min-height: max(760px, min(900px, 100svh)); padding: calc(var(--header-height) + 75px) 0 80px; display: flex; align-items: center; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse at 77% 40%, var(--violet-glow), transparent 33rem), radial-gradient(ellipse at 14% 10%, var(--glow), transparent 30rem); }
.hero::before, .hero::after { position: absolute; z-index: -1; border-radius: 50%; content: ""; pointer-events: none; }
.hero::before { top: 15%; left: 48%; width: 12px; height: 12px; background: color-mix(in srgb, var(--amber), transparent 28%); box-shadow: 0 0 30px 10px var(--amber-glow); animation: drift-one 12s ease-in-out infinite; }
.hero::after { right: 4%; bottom: 18%; width: 8px; height: 8px; background: color-mix(in srgb, var(--violet), transparent 20%); box-shadow: 0 0 34px 14px var(--violet-glow); animation: drift-two 15s ease-in-out infinite; }
.hero-glow { position: absolute; z-index: -1; width: 580px; aspect-ratio: 1; border-radius: 50%; filter: blur(90px); pointer-events: none; animation: breathe 12s ease-in-out infinite alternate; }
.hero-glow--one { top: 9%; right: 5%; background: radial-gradient(circle, var(--glow) 0 12%, transparent 70%), radial-gradient(circle, var(--violet-glow), transparent 68%); }
.hero-glow--two { bottom: -35%; left: 8%; width: 400px; background: radial-gradient(circle, var(--amber-glow), transparent 68%); animation-delay: -5s; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(320px, .94fr); align-items: center; gap: clamp(55px, 8vw, 120px); }
.hero-copy { position: relative; z-index: 2; padding-top: 3px; animation: arrive-up .7s var(--ease) both; }
.portrait-note { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--text-soft); font-size: 11px; letter-spacing: .025em; }
.note-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px color-mix(in srgb, #4ade80, transparent 35%); }
.eyebrow, .section-kicker { margin: 0 0 22px; color: var(--accent); font-size: 11px; font-weight: 650; letter-spacing: .17em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 11px; }
.eyebrow-line { display: inline-block; width: 28px; height: 1px; background: var(--accent); }
.hero h1 { margin: 0; font-size: clamp(62px, 8vw, 105px); line-height: .98; letter-spacing: -.078em; font-weight: 650; }
.hero h1 span, .section-heading h2 span, .contact-heading h2 span, .journey-heading h2 span { color: var(--accent); background: linear-gradient(100deg, var(--accent), var(--violet) 72%, var(--amber)); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-role { margin: 27px 0 13px; color: var(--text); font-size: clamp(17px, 2.1vw, 22px); font-weight: 500; letter-spacing: -.025em; }
.hero-role span { padding: 0 5px; color: var(--blue); }
.mobile-break { display: none; }
.hero-intro { max-width: 460px; margin: 0; color: var(--text-soft); font-size: 15px; line-height: 1.8; }
.location { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; color: var(--muted); font-size: 12px; letter-spacing: .045em; }
.location svg { width: 15px; fill: none; stroke: var(--accent); stroke-width: 1.5; }
.hero-actions { display: flex; align-items: center; gap: 27px; margin-top: 32px; }
.button { min-height: 48px; display: inline-flex; justify-content: center; align-items: center; gap: 13px; padding: 0 20px; border: 1px solid transparent; border-radius: 3px; font-size: 12px; font-weight: 650; letter-spacing: .025em; text-decoration: none; cursor: pointer; transition: transform .2s ease, border-color .2s ease, color .2s ease, background-color .2s ease; }
.button span { font-size: 16px; line-height: 1; transition: transform .2s ease; }
.button:hover span { transform: translate(2px, -2px); }
.button--primary { color: var(--accent-ink); background: var(--accent); }
.button--primary:hover { background: var(--accent-strong); transform: translateY(-2px); }
.button--text { min-height: 44px; padding-inline: 0; color: var(--text); background: transparent; }
.button--text:hover { color: var(--accent); }
.button--outline { border-color: var(--line); color: var(--text); background: transparent; }
.button--outline:hover { border-color: var(--accent); color: var(--accent); }
.button--small { min-height: 39px; padding-inline: 15px; font-size: 11px; }
.hero-socials { display: flex; align-items: center; gap: 14px; margin-top: 55px; color: var(--muted); font-size: 11px; }
.hero-socials a { text-decoration: none; transition: color .2s ease; }
.hero-socials a:hover { color: var(--accent); }
.hero-socials a span { color: var(--accent); }
.social-divider { width: 1px; height: 13px; background: var(--line); }
.hero-visual { position: relative; justify-self: end; width: min(100%, 390px); height: clamp(390px, 44vw, 500px); display: grid; place-items: center; animation: arrive-up .85s .13s var(--ease) both; }
.portrait-frame { position: relative; width: 98%; height: 86%; overflow: hidden; border: 0; border-radius: 43% 43% 24% 24% / 34% 34% 22% 22%; background: var(--surface-raised); box-shadow: 0 30px 90px rgb(2 9 18 / 35%), 0 0 70px var(--glow), 24px 18px 80px var(--violet-glow); transform: rotate(1.5deg); }
.portrait-frame::after { position: absolute; inset: 0; content: ""; border-radius: inherit; background: linear-gradient(150deg, transparent 48%, color-mix(in srgb, var(--violet), transparent 96%)); pointer-events: none; }
.profile-image { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: 52% 31%; transform: rotate(-1.5deg) scale(1.04); }
.portrait-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; background: radial-gradient(ellipse at 50% 37%, color-mix(in srgb, var(--accent), transparent 91%), transparent 48%), linear-gradient(150deg, var(--surface-raised), var(--surface-quiet)); }
.portrait-placeholder::before, .portrait-placeholder::after { position: absolute; width: 72%; aspect-ratio: 1; border: 1px solid color-mix(in srgb, var(--accent), transparent 86%); border-radius: 50%; content: ""; }
.portrait-placeholder::after { width: 94%; }
.portrait-initials { position: relative; z-index: 1; color: color-mix(in srgb, var(--accent), transparent 20%); font-size: clamp(74px, 12vw, 140px); font-weight: 300; letter-spacing: -.1em; }
.portrait-caption { position: absolute; z-index: 2; bottom: 29px; color: var(--text-soft); font-size: 10px; line-height: 1.5; text-align: center; }
.portrait-caption code { color: var(--accent); font-size: 9px; }
.visual-index { position: absolute; top: 8%; right: 0; color: var(--muted); font-size: 9px; letter-spacing: .17em; writing-mode: vertical-rl; }
.scroll-cue { position: absolute; bottom: 28px; left: var(--gutter); display: flex; align-items: center; gap: 12px; color: var(--muted); text-decoration: none; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.scroll-cue-line { width: 31px; height: 1px; background: var(--accent); }

/* Section headings and shared details */
.section-heading { margin-bottom: 54px; }
.section-kicker { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; font-size: 10px; }
.section-kicker span { color: var(--blue); font: 10px/1 monospace; letter-spacing: .08em; }
.section-kicker span::before { display: inline-block; width: 22px; height: 1px; margin-right: 12px; vertical-align: middle; background: var(--line); content: ""; }
.section-heading h2, .contact-heading h2, .journey-heading h2 { margin: 0; font-size: clamp(43px, 6.25vw, 75px); line-height: 1.04; font-weight: 580; letter-spacing: -.066em; }
.section-heading--split { display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.section-aside { max-width: 340px; margin: 0 0 4px; color: var(--text-soft); font-size: 13px; line-height: 1.85; }
.about-section { background: radial-gradient(ellipse at 88% 20%, var(--violet-glow), transparent 28rem), var(--bg-soft); }
.about-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: clamp(50px, 9vw, 120px); }
.about-copy { max-width: 500px; color: var(--text-soft); font-size: 14px; line-height: 1.9; }
.about-copy p { margin: 0 0 19px; }
.about-copy .lead-copy { color: var(--text); font-size: 19px; line-height: 1.65; letter-spacing: -.025em; }
.inline-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--accent); text-decoration: none; font-size: 12px; font-weight: 600; }
.inline-link span { transition: transform .2s ease; }
.inline-link:hover span { transform: translate(3px, -3px); }
.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fact-card { min-height: 126px; padding: 21px; border: 1px solid var(--line); background: var(--surface); transition: transform .25s var(--ease), border-color .25s ease; }
.fact-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent), var(--line) 35%); }
.fact-symbol { color: var(--accent); font: 11px/1 monospace; }
.fact-label { margin: 17px 0 3px; color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.fact-value { margin: 0; color: var(--text); font-size: 14px; font-weight: 550; }

/* Learning interests */
.skills-section { background: var(--bg); }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.skill-group { min-height: 190px; padding: 23px 22px; border: 1px solid var(--line); background: var(--surface); transition: border-color .25s ease, transform .25s var(--ease); }
.skill-group:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent), var(--line) 40%); }
.skill-group-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.skill-group h3 { margin: 0; color: var(--text); font-size: 13px; font-weight: 600; }
.skill-number { color: var(--muted); font: 10px/1 monospace; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; }
.skill-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 2px; color: var(--text-soft); font-size: 10px; }
.skill-chip::before { width: 5px; height: 5px; border-radius: 50%; background: var(--blue); content: ""; opacity: .8; }
.skill-stage { padding-left: 7px; border-left: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.skill-empty { margin: 18px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.edit-note { margin: 25px 0 0; color: var(--muted); font-size: 10px; }
.edit-note > span { margin-right: 7px; color: var(--accent); }
.edit-note code, .aside-small code, .resume-card code { color: var(--accent); font: 10px/1.5 "Cascadia Code", Consolas, monospace; }

/* Project placeholders */
.projects-section { background: radial-gradient(ellipse at 8% 48%, var(--glow), transparent 30rem), var(--bg-soft); }
.project-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-count { margin: 0; color: var(--muted); font: 10px/1.4 monospace; letter-spacing: .06em; }
.project-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-button { padding: 8px 11px; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; transition: border-color .2s ease, color .2s ease, background-color .2s ease; }
.filter-button:hover { color: var(--text); }
.filter-button.is-active { color: var(--accent); border-color: var(--line); background: var(--surface); }
.filter-button span { margin-left: 5px; color: var(--muted); font: 9px monospace; }
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding-top: 22px; }
.project-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); background: var(--surface); transition: border-color .25s ease, transform .25s var(--ease), box-shadow .25s ease; }
.project-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent), var(--line) 35%); box-shadow: var(--shadow); }
.project-art { position: relative; height: clamp(155px, 20vw, 230px); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); background: linear-gradient(140deg, var(--surface-raised), var(--surface-quiet)); }
.project-art::before { position: absolute; inset: 0; content: ""; background: radial-gradient(ellipse at 25% 20%, var(--violet-glow), transparent 55%), radial-gradient(ellipse at 75% 80%, var(--glow), transparent 58%); }
.project-art::after { position: absolute; width: 130px; aspect-ratio: 1; border: 0; border-radius: 46% 54% 63% 37%; content: ""; background: radial-gradient(circle at 36% 32%, color-mix(in srgb, var(--accent), transparent 80%), color-mix(in srgb, var(--violet), transparent 94%) 65%); filter: blur(1px); box-shadow: 0 0 50px var(--glow); transition: transform .5s var(--ease), border-radius .5s var(--ease); }
.project-card:hover .project-art::after { transform: rotate(25deg) scale(1.12); border-radius: 58% 42% 38% 62%; }
.project-art img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-art--python::after { border-radius: 38% 62% 56% 44%; transform: rotate(25deg) scale(.82, 1.12); }
.project-art--other::after { border-radius: 48% 52% 32% 68%; transform: rotate(45deg) scale(.82); }
.art-code { position: relative; z-index: 2; display: grid; place-items: center; width: 70px; height: 70px; border: 1px solid color-mix(in srgb, var(--accent), transparent 48%); border-radius: 50%; color: var(--accent); background: var(--surface); font: 18px/1 monospace; box-shadow: 0 0 30px var(--glow); }
.project-content { padding: 22px 23px 21px; }
.project-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.project-category { color: var(--blue); font-size: 9px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; }
.project-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.project-status::before { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); content: ""; }
.project-content h3 { margin: 15px 0 6px; font-size: 18px; font-weight: 550; letter-spacing: -.025em; }
.project-content > p { min-height: 39px; margin: 0; color: var(--text-soft); font-size: 11px; line-height: 1.7; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.project-tag { padding: 4px 7px; border: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.project-links { display: flex; gap: 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.project-link, .project-link--empty { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: 10px; text-decoration: none; }
.project-link:hover { color: var(--accent); }
.project-link--empty { color: var(--muted); }
.projects-empty { padding: 60px 20px; border: 1px dashed var(--line); text-align: center; }
.projects-empty[hidden] { display: none; }
.empty-mark { color: var(--accent); font-size: 24px; }
.projects-empty h3 { margin: 13px 0 5px; font-size: 18px; font-weight: 550; }
.projects-empty p { margin: 0; color: var(--text-soft); font-size: 12px; }

/* Education and journey */
.education-section { background: var(--bg); }
.education-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(245px, .7fr); align-items: stretch; gap: clamp(45px, 9vw, 115px); }
.timeline { position: relative; padding-left: 26px; border-left: 1px solid var(--line); }
.education-item { position: relative; padding: 4px 0 30px 7px; }
.education-item:last-child { padding-bottom: 4px; }
.education-item::before { position: absolute; top: 8px; left: -32px; width: 11px; height: 11px; border: 2px solid var(--accent); border-radius: 50%; background: var(--bg); content: ""; box-shadow: 0 0 0 5px var(--bg); }
.education-current { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.education-current::before { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); content: ""; }
.education-item h3 { max-width: 520px; margin: 13px 0 7px; font-size: clamp(19px, 2.4vw, 26px); font-weight: 540; line-height: 1.3; letter-spacing: -.035em; }
.education-item p { margin: 3px 0; color: var(--text-soft); font-size: 12px; }
.education-item .education-institution { color: var(--text); font-weight: 550; }
.education-years { margin-top: 13px !important; color: var(--muted) !important; font: 10px/1.5 monospace !important; }
.education-detail { margin-top: 17px !important; color: var(--muted) !important; font-size: 10px !important; }
.education-aside { position: relative; padding: 25px 26px; align-self: start; border: 1px solid var(--line); background: var(--surface); }
.aside-number { position: absolute; top: 24px; right: 25px; color: var(--muted); font: 10px/1 monospace; }
.aside-label { margin: 0 0 21px; color: var(--accent); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.education-aside h3 { max-width: 250px; margin: 0; font-size: 22px; line-height: 1.35; font-weight: 540; letter-spacing: -.04em; }
.education-aside > p:not(.aside-label) { margin: 13px 0 0; color: var(--text-soft); font-size: 11px; line-height: 1.8; }
.aside-rule { display: block; width: 34px; height: 1px; margin: 23px 0 14px; background: var(--accent); }
.education-aside .aside-small { margin: 0 !important; color: var(--muted) !important; font-size: 9px !important; }
.journey-section { padding-top: 0; background: var(--bg); }
.journey-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(45px, 8vw, 105px); padding: clamp(32px, 6.2vw, 73px); border: 1px solid var(--line); background: var(--surface); }
.journey-heading .section-kicker { margin-bottom: 20px; }
.journey-heading h2 { font-size: clamp(38px, 5vw, 58px); }
.journey-heading > p:last-child { max-width: 300px; margin: 19px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.8; }
.journey-list { align-self: center; }
.journey-item { display: grid; grid-template-columns: 37px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.journey-item:first-child { padding-top: 0; }
.journey-item:last-child { padding-bottom: 0; border-bottom: 0; }
.journey-index { color: var(--accent); font: 10px/1.6 monospace; }
.journey-item h3 { margin: 0 0 5px; font-size: 13px; font-weight: 600; }
.journey-item p { margin: 0; color: var(--text-soft); font-size: 11px; line-height: 1.65; }

/* Contact and footer */
.contact-section { padding-bottom: clamp(90px, 11vw, 155px); background: radial-gradient(ellipse at 82% 12%, var(--amber-glow), transparent 28rem), radial-gradient(ellipse at 12% 75%, var(--violet-glow), transparent 32rem), radial-gradient(ellipse at 58% 90%, var(--coral-glow), transparent 26rem), var(--bg-soft); }
.contact-heading { max-width: 750px; margin-bottom: 50px; }
.contact-heading .section-kicker { margin-bottom: 21px; }
.contact-heading > p:last-child { max-width: 430px; margin: 19px 0 0; color: var(--text-soft); font-size: 13px; }
.contact-layout { display: grid; grid-template-columns: minmax(260px, .78fr) minmax(0, 1.22fr); align-items: start; gap: clamp(30px, 6.5vw, 85px); }
.contact-details { display: grid; gap: 10px; }
.contact-card { display: grid; grid-template-columns: 39px 1fr 15px; align-items: center; gap: 13px; min-width: 0; padding: 15px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: border-color .2s ease, transform .2s var(--ease); }
.contact-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent), var(--line) 40%); }
.contact-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--blue); font-size: 16px; font-weight: 500; }
.contact-icon--github, .contact-icon--linkedin { font-size: 10px; font-weight: 700; }
.contact-card small { display: block; color: var(--muted); font-size: 9px; }
.contact-card strong { display: block; overflow-wrap: anywhere; color: var(--text); font-size: 11px; font-weight: 550; }
.contact-arrow { color: var(--muted); font-size: 14px; transition: transform .2s ease, color .2s ease; }
.contact-card:hover .contact-arrow { color: var(--accent); transform: translate(2px, -2px); }
.resume-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 9px; padding: 18px 15px; border: 1px dashed var(--line); }
.resume-label { color: var(--text); font-size: 11px; font-weight: 600; }
.resume-card p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.resume-card .button { flex: 0 0 auto; }
.contact-form { padding: clamp(22px, 4vw, 37px); border: 1px solid var(--line); background: var(--surface); }
.form-intro { margin-bottom: 23px; }
.form-intro h3 { margin: 0 0 3px; font-size: 18px; font-weight: 570; }
.form-intro p { margin: 0; color: var(--muted); font-size: 10px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-field { min-width: 0; margin-bottom: 14px; }
.form-field label { display: block; margin-bottom: 6px; color: var(--text-soft); font-size: 10px; font-weight: 550; }
.form-field label span { color: var(--accent); }
.form-field input, .form-field textarea { width: 100%; min-height: 43px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 2px; outline: none; color: var(--text); background: var(--bg); font-size: 11px; transition: border-color .2s ease, box-shadow .2s ease; }
.form-field textarea { min-height: 108px; resize: vertical; }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--muted); opacity: .75; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent), transparent 85%); }
.form-field input[aria-invalid="true"], .form-field textarea[aria-invalid="true"] { border-color: #d16c63; }
.form-submit { min-width: 170px; margin-top: 2px; }
.form-status { min-height: 17px; margin: 11px 0 0; color: var(--accent); font-size: 10px; }
.form-status.is-error { color: #e18b7f; }
.site-footer { padding: 28px 0; border-top: 1px solid var(--line); background: var(--bg); }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 20px; }
.footer-inner > p { margin: 0; color: var(--text-soft); font-size: 10px; line-height: 1.7; text-align: center; }
.footer-inner > p span { color: var(--muted); }
.back-to-top { justify-self: end; display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); text-decoration: none; font-size: 10px; transition: color .2s ease; }
.back-to-top:hover { color: var(--accent); }
.back-to-top span { color: var(--accent); font-size: 15px; }
.floating-top { position: fixed; z-index: 800; right: max(20px, calc((100vw - var(--page)) / 2)); bottom: 22px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--accent-ink); background: var(--accent); box-shadow: var(--shadow); font-size: 19px; cursor: pointer; opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, background-color .2s ease; }
.floating-top.is-visible { opacity: 1; transform: translateY(0); }
.floating-top:hover { background: var(--accent-strong); }

/* Reveal, loading, and reduced-motion states */
.js-ready .reveal, .js-ready .reveal-item { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js-ready .reveal.is-visible, .js-ready .reveal-item.is-visible { opacity: 1; transform: translateY(0); }
.js-ready .reveal-item:nth-child(2) { transition-delay: 70ms; }
.js-ready .reveal-item:nth-child(3) { transition-delay: 130ms; }
.js-ready .reveal-item:nth-child(4) { transition-delay: 190ms; }
.js-ready .reveal-item:nth-child(5) { transition-delay: 250ms; }
@keyframes arrive-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes drift-one { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(18px, -24px, 0); } }
@keyframes drift-two { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(-16px, 20px, 0); } }
@keyframes breathe { from { transform: scale(.94); opacity: .75; } to { transform: scale(1.08); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js-ready .reveal, .js-ready .reveal-item { opacity: 1; transform: none; }
}

/* Responsive layout */
@media (max-width: 940px) {
  :root { --header-height: 70px; }
  .nav-shell { width: calc(100% - 40px); }
  .nav-links { gap: 17px; }
  .nav-link { font-size: 11px; }
  .hero-inner { gap: 45px; }
  .hero h1 { font-size: clamp(58px, 8vw, 82px); }
  .hero-visual { height: 410px; }
}
@media (max-width: 780px) {
  .menu-toggle { display: grid; }
  .nav-actions > .theme-toggle { display: none; }
  .nav-mobile-actions { display: flex; justify-content: center; padding-top: 17px; border-top: 1px solid var(--line); }
  .nav-panel { position: fixed; top: calc(var(--header-height) + 8px); right: 16px; left: 16px; display: block; padding: 22px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none; transition: opacity .2s ease, transform .2s ease, visibility .2s ease; }
  .nav-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
  .nav-links { display: grid; gap: 0; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-link { display: block; padding: 14px 2px; color: var(--text); font-size: 13px; }
  .nav-link::after { display: none; }
  .nav-link.is-active { color: var(--accent); }
  .hero { min-height: 770px; padding-top: calc(var(--header-height) + 90px); padding-bottom: 85px; }
  .hero-inner { grid-template-columns: 1fr .78fr; gap: 25px; }
  .hero h1 { font-size: clamp(52px, 9.3vw, 75px); }
  .hero-visual { width: 100%; height: 355px; }
  .portrait-frame { width: 81%; height: 82%; }
  .hero-intro { font-size: 13px; }
  .hero-socials { margin-top: 36px; }
  .about-layout { gap: 38px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .education-layout { grid-template-columns: minmax(0, 1.1fr) minmax(225px, .9fr); gap: 35px; }
  .journey-panel { grid-template-columns: 1fr 1fr; gap: 38px; }
  .contact-layout { grid-template-columns: minmax(220px, .78fr) minmax(0, 1.22fr); gap: 25px; }
}
@media (max-width: 600px) {
  :root { --gutter: 23px; --header-height: 66px; }
  .hero { min-height: auto; padding: calc(var(--header-height) + 63px) 0 65px; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-copy { order: 1; }
  .hero-visual { order: 0; justify-self: center; width: min(74%, 290px); height: 320px; margin-bottom: 2px; }
  .portrait-frame { width: 78%; height: 88%; }
  .visual-index { top: 4%; right: -8%; }
  .hero-copy { text-align: left; }
  .eyebrow { margin-bottom: 14px; }
  .hero h1 { font-size: clamp(58px, 17vw, 82px); }
  .hero-role { max-width: 350px; margin-top: 18px; font-size: 17px; }
  .hero-role span { display: none; }
  .mobile-break { display: initial; }
  .hero-intro { max-width: 400px; }
  .hero-actions { gap: 21px; margin-top: 26px; }
  .button { min-height: 46px; padding-inline: 16px; font-size: 11px; }
  .button--text { padding-inline: 0; }
  .hero-socials { margin-top: 32px; }
  .scroll-cue { display: none; }
  .section { padding: 82px 0; }
  .section-heading { margin-bottom: 36px; }
  .section-heading--split { align-items: start; flex-direction: column; gap: 19px; }
  .section-heading h2, .contact-heading h2 { font-size: clamp(44px, 13vw, 62px); }
  .section-aside { max-width: 400px; font-size: 12px; }
  .about-layout { grid-template-columns: 1fr; gap: 32px; }
  .about-copy { max-width: none; font-size: 13px; }
  .about-copy .lead-copy { font-size: 17px; }
  .fact-card { min-height: 113px; padding: 16px; }
  .fact-label { margin-top: 12px; }
  .fact-value { font-size: 12px; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .skill-group { min-height: 158px; padding: 17px 14px; }
  .skill-group h3 { font-size: 11px; }
  .skill-chips { gap: 6px; }
  .skill-chip { padding: 6px 7px; font-size: 9px; }
  .edit-note { line-height: 1.8; }
  .project-toolbar { align-items: start; flex-direction: column; gap: 12px; }
  .project-filters { gap: 2px; }
  .filter-button { padding: 8px 9px; font-size: 9px; }
  .projects-grid { grid-template-columns: 1fr; gap: 13px; }
  .project-art { height: 190px; }
  .education-layout { grid-template-columns: 1fr; gap: 33px; }
  .education-aside { max-width: 440px; }
  .journey-section { padding-top: 0; }
  .journey-panel { grid-template-columns: 1fr; gap: 32px; padding: 27px 21px; }
  .journey-heading h2 { font-size: 47px; }
  .contact-heading { margin-bottom: 34px; }
  .contact-heading > p:last-child { font-size: 12px; }
  .contact-layout { grid-template-columns: 1fr; gap: 28px; }
  .contact-details { gap: 8px; }
  .contact-card { padding: 12px; }
  .contact-form { padding: 20px 16px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-submit { width: 100%; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > p { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .back-to-top { grid-column: 2; grid-row: 1; }
  .floating-top { right: 16px; bottom: 16px; }
}
@media (max-width: 360px) {
  :root { --gutter: 18px; }
  .hero-visual { width: 79%; height: 294px; }
  .hero-actions { gap: 15px; }
  .hero-actions .button--primary { padding-inline: 12px; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-group { min-height: auto; }
  .resume-card { align-items: flex-start; flex-direction: column; }
}
