:root {
  color-scheme: dark;
  --canvas: #0b1120;
  --surface: #111827;
  --surface-raised: #172033;
  --surface-hover: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.14);
  --primary: #38bdf8;
  --primary-strong: #0ea5e9;
  --primary-tint: rgba(56, 189, 248, 0.12);
  --green: #72bc8f;
  --green-tint: rgba(114, 188, 143, 0.12);
  --orange: #de9255;
  --orange-tint: rgba(222, 146, 85, 0.12);
  --purple: #bf8eda;
  --purple-tint: rgba(191, 142, 218, 0.12);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
  --radius: 12px;
  --container: 1120px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #ffffff;
  --surface: #f9f8f7;
  --surface-raised: #ffffff;
  --surface-hover: #f0efed;
  --text: #2c2c2b;
  --text-muted: #6f6c67;
  --border: #e6e5e3;
  --primary: #1672c4;
  --primary-strong: #0f5d9f;
  --primary-tint: #e5f2fc;
  --green: #347d57;
  --green-tint: #e8f1ec;
  --orange: #a75f27;
  --orange-tint: #fbebde;
  --purple: #8657a1;
  --purple-tint: #f1e7f6;
  --shadow: 0 18px 50px rgba(39, 39, 36, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
::selection { background: var(--primary); color: #07111f; }

.skip-link {
  position: fixed;
  z-index: 999;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--canvas);
  transform: translateY(-150%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }
.section-block { padding-block: 88px; }

.demo-banner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 24px;
  background: var(--primary-tint);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}
.demo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 5px var(--primary-tint); }
#site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--primary); color: #07111f; font-weight: 850; letter-spacing: -.04em; }
.brand strong, .brand small { display: block; line-height: 1.3; }
.brand strong { font-size: 15px; }
.brand small { color: var(--text-muted); font-size: 12px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a, .theme-toggle { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 8px; color: var(--text-muted); text-decoration: none; border: 0; background: transparent; cursor: pointer; }
.nav-links a:hover, .theme-toggle:hover { color: var(--text); background: var(--surface-hover); }
.nav-links a:focus-visible, .theme-toggle:focus-visible, .nav-toggle:focus-visible, .button:focus-visible, summary:focus-visible, .contact-links a:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.theme-toggle { width: 44px; font-size: 21px; }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; height: 2px; margin: 5px 0; border-radius: 2px; background: var(--text); }

#hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
#hero::before { content: ""; position: absolute; width: 540px; height: 540px; top: -240px; right: -160px; border-radius: 50%; background: radial-gradient(circle, var(--primary-tint), transparent 70%); pointer-events: none; }
.hero-grid { min-height: 690px; padding-block: 80px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 72px; align-items: center; }
.eyebrow { margin: 0 0 12px; color: var(--primary); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 8px; font-size: clamp(48px, 7vw, 84px); line-height: .98; letter-spacing: -.055em; }
h1 span { color: var(--primary); }
.hero-role { margin-bottom: 20px; color: var(--text); font-size: clamp(22px, 3vw, 31px); font-weight: 650; letter-spacing: -.02em; }
.hero-summary { max-width: 680px; color: var(--text-muted); font-size: 18px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; border: 1px solid var(--border); border-radius: 9px; font-weight: 750; text-decoration: none; }
.button--primary { background: var(--primary); color: #07111f; border-color: transparent; }
.button--primary:hover { background: var(--primary-strong); color: #fff; }
.button--secondary { background: var(--surface); }
.button--secondary:hover { background: var(--surface-hover); }
.availability { display: flex; align-items: center; gap: 10px; margin-top: 24px; color: var(--text-muted); font-size: 14px; }
.availability span { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-tint); }
.profile-card { overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.avatar-frame { padding: 28px; background: linear-gradient(145deg, var(--primary-tint), transparent); border-bottom: 1px solid var(--border); }
.avatar-frame img { width: 210px; margin: auto; border-radius: 20px; }
.profile-card__body { padding: 28px; }
.profile-card__label { margin-bottom: 6px; color: var(--text-muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.profile-card h2 { margin-bottom: 8px; font-size: 26px; letter-spacing: -.03em; }
.profile-card p { color: var(--text-muted); }
.profile-card dl { margin: 24px 0 0; }
.profile-card dl div { display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.profile-card dt { color: var(--text-muted); font-size: 13px; }
.profile-card dd { margin: 0; font-size: 14px; font-weight: 650; }

#about, #skills, #journey, #roadmap { background: var(--surface); }
.section-heading { max-width: 720px; margin-bottom: 42px; }
.section-heading h2, .contact-panel h2 { margin-bottom: 12px; font-size: clamp(34px, 5vw, 54px); line-height: 1.08; letter-spacing: -.045em; }
.section-heading > p:last-child { max-width: 650px; color: var(--text-muted); font-size: 17px; }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; }
.about-grid .section-heading { margin-bottom: 0; }
.about-copy { max-width: 700px; }
.about-copy p { color: var(--text-muted); font-size: 18px; line-height: 1.8; }
.about-copy p:first-child::first-letter { float: left; margin: 6px 10px 0 0; color: var(--primary); font-size: 54px; line-height: .8; font-weight: 800; }

.learning-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.learning-item { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.learning-item:nth-child(odd) { border-right: 1px solid var(--border); }
.learning-item:nth-last-child(-n+2) { border-bottom: 0; }

.status { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 9px; border-radius: 999px; background: var(--primary-tint); color: var(--primary); font-size: 12px; font-weight: 800; white-space: nowrap; }
.status--completed, .status--practicing { background: var(--green-tint); color: var(--green); }
.status--in-progress, .status--learning, .status--learning-exercise { background: var(--primary-tint); color: var(--primary); }
.status--planned, .status--exploring { background: var(--purple-tint); color: var(--purple); }
.status--coming-soon, .status--future-feature, .status--future-improvement, .status--future-architecture { background: var(--orange-tint); color: var(--orange); }
.status--demo { background: var(--surface-hover); color: var(--text-muted); }

.card-grid { display: grid; gap: 18px; }
.card-grid--skills { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.skill-card { min-height: 100%; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--canvas); }
.skill-card:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); transform: translateY(-2px); }
.icon-box { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 9px; color: var(--primary); background: var(--primary-tint); }
.icon-box svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skill-card h3 { margin-bottom: 16px; font-size: 19px; }
.skill-card ul { margin: 0; padding: 0; list-style: none; }
.skill-card li { position: relative; padding: 6px 0 6px 16px; color: var(--text-muted); font-size: 14px; }
.skill-card li::before { content: ""; position: absolute; left: 0; top: 15px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }

.project-list { display: grid; gap: 16px; }
.project-card { display: grid; grid-template-columns: 74px 1fr; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.project-number { display: grid; place-items: center; border-right: 1px solid var(--border); color: var(--primary); font-size: 20px; font-weight: 800; background: var(--primary-tint); }
.project-card__content { padding: 28px; }
.project-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.project-card h3 { margin-bottom: 10px; font-size: 25px; letter-spacing: -.025em; }
.project-card p { max-width: 760px; color: var(--text-muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.tag-list span { padding: 5px 9px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted); font-size: 12px; }
details { border-top: 1px solid var(--border); padding-top: 16px; }
summary { width: fit-content; color: var(--primary); cursor: pointer; font-weight: 700; }
details ul { margin: 12px 0 0; color: var(--text-muted); }

.timeline { position: relative; max-width: 850px; margin-left: 10px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 1px; background: var(--border); }
.timeline-item { position: relative; display: grid; grid-template-columns: 40px 1fr; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker { position: relative; z-index: 1; width: 17px; height: 17px; margin-top: 7px; border: 4px solid var(--surface); border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.timeline-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--text-muted); font-size: 13px; }
.timeline-item h3 { margin-bottom: 8px; font-size: 23px; }
.timeline-item p { max-width: 720px; margin-bottom: 0; color: var(--text-muted); }

.credential-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.credential-list article { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.credential-list article:last-child { border-bottom: 0; }
.credential-list p { margin-bottom: 2px; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .09em; }
.credential-list h3 { margin: 0; font-size: 16px; }

.roadmap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.roadmap-card { min-height: 210px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--canvas); }
.roadmap-card h3 { margin: 24px 0 10px; font-size: 19px; }
.roadmap-card p { margin-bottom: 0; color: var(--text-muted); font-size: 14px; }

.contact-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px 72px; }
.contact-panel > div:first-child p:last-child { max-width: 620px; color: var(--text-muted); font-size: 17px; }
.contact-details { align-self: end; padding: 4px 0; }
.contact-details p { display: grid; grid-template-columns: 80px 1fr; gap: 20px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--border); }
.contact-details span { color: var(--text-muted); font-size: 13px; }
.contact-links { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.contact-links a { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); text-decoration: none; }
.contact-links a:hover { background: var(--surface-hover); }
.contact-links strong, .contact-links small { display: block; }
.contact-links small { margin-top: 3px; color: var(--text-muted); }
.contact-links a.is-notified { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }

#site-footer { padding: 38px 0; border-top: 1px solid var(--border); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
.footer-grid p { margin-bottom: 0; color: var(--text-muted); font-size: 13px; }
.footer-grid > p:last-child { text-align: right; }
.noscript, .fatal-error { max-width: 700px; margin: 40px auto; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity .55s ease, transform .55s ease, border-color .2s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; min-height: auto; }
  .profile-card { max-width: 620px; }
  .avatar-frame img { width: 180px; }
  .card-grid--skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roadmap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: calc(100% + 1px); left: 24px; right: 24px; display: none; align-items: stretch; flex-direction: column; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); box-shadow: var(--shadow); }
  .nav-links.is-open { display: flex; }
  .nav-links a { justify-content: flex-start; }
  .theme-toggle { width: 100%; justify-content: flex-start; padding-left: 12px; }
}

@media (max-width: 760px) {
  .container { width: min(calc(100% - 32px), var(--container)); }
  .section-block { padding-block: 64px; }
  .hero-grid { padding-block: 60px; }
  h1 { font-size: clamp(44px, 15vw, 64px); }
  .about-grid, .contact-panel { grid-template-columns: 1fr; gap: 28px; }
  .learning-grid, .contact-links { grid-template-columns: 1fr; }
  .learning-item:nth-child(odd) { border-right: 0; }
  .learning-item:nth-last-child(2) { border-bottom: 1px solid var(--border); }
  .card-grid--skills, .roadmap-grid { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr; }
  .project-number { min-height: 42px; border-right: 0; border-bottom: 1px solid var(--border); justify-content: start; padding-left: 20px; }
  .project-card__top { flex-direction: column; gap: 8px; }
  .contact-links { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > p:last-child { text-align: left; }
  .roadmap-card { min-height: auto; }
}

@media (max-width: 430px) {
  .demo-banner { font-size: 12px; }
  .brand small { display: none; }
  .profile-card__body, .project-card__content { padding: 22px; }
  .learning-item, .credential-list article, .contact-links a { align-items: flex-start; flex-direction: column; }
  .contact-details p { grid-template-columns: 1fr; gap: 2px; }
}

@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; }
}
