:root {
  --bg: #f6f4ef;
  --bg-alt: #ece8df;
  --surface: #ffffff;
  --surface-2: #f8f6f1;
  --text: #151515;
  --muted: #666159;
  --line: rgba(21, 21, 21, 0.12);
  --accent: #a87432;
  --accent-strong: #744817;
  --accent-soft: rgba(168, 116, 50, 0.12);
  --header: rgba(246, 244, 239, 0.84);
  --success: #297c58;
  --danger: #b54c4c;
  --shadow: 0 28px 80px rgba(39, 30, 18, 0.13);
  --shadow-soft: 0 14px 40px rgba(39, 30, 18, 0.08);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --container: 1180px;
  --header-height: 78px;
}

html[data-theme="dark"] {
  --bg: #0a0f18;
  --bg-alt: #101722;
  --surface: #131c29;
  --surface-2: #0e1621;
  --text: #f6f3ec;
  --muted: #a5aeba;
  --line: rgba(255, 255, 255, 0.10);
  --accent: #d9a75e;
  --accent-strong: #f2c57e;
  --accent-soft: rgba(217, 167, 94, 0.12);
  --header: rgba(10, 15, 24, 0.82);
  --success: #74d1a5;
  --danger: #f08b8b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.20);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
::selection { background: var(--accent); color: #111; }

.skip-link {
  position: fixed; z-index: 9999; left: 16px; top: 14px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--text); color: var(--bg);
  transform: translateY(-180%); transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.scroll-progress {
  position: fixed; z-index: 2000; left: 0; top: 0; height: 3px; width: 0;
  background: var(--accent); box-shadow: 0 0 18px var(--accent);
}

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.section { position: relative; padding: 112px 0; scroll-margin-top: calc(var(--header-height) + 10px); }
.section-muted { background: var(--bg-alt); }

.site-header {
  position: sticky; z-index: 1000; top: 0;
  border-bottom: 1px solid var(--line); background: var(--header);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.header-inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: max-content; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 13px; background: var(--surface);
  color: var(--accent-strong); font-size: .78rem; font-weight: 900; letter-spacing: .08em;
  box-shadow: var(--shadow-soft);
}
.brand-copy { display: grid; line-height: 1.1; gap: 4px; }
.brand-copy strong { font-size: .94rem; letter-spacing: -.02em; }
.brand-copy small { color: var(--muted); font-size: .68rem; font-weight: 650; }

.nav { display: flex; align-items: center; gap: 24px; }
.nav a {
  position: relative; padding: 28px 0; color: var(--muted);
  font-size: .84rem; font-weight: 750; transition: color .18s ease;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 18px; height: 2px;
  border-radius: 99px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 9px; }
.icon-button, .menu-button, .back-to-top {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  cursor: pointer; box-shadow: var(--shadow-soft);
}
.icon-button { width: 42px; height: 42px; border-radius: 13px; transition: transform .18s ease, border-color .18s ease; }
.icon-button:hover { transform: translateY(-2px); border-color: var(--accent); }
.menu-button { display: none; width: 44px; height: 44px; border-radius: 13px; padding: 10px; }
.menu-button span { display: block; width: 21px; height: 2px; margin: 4px auto; border-radius: 99px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.hero { min-height: calc(100vh - var(--header-height)); display: grid; align-items: center; padding: 84px 0 92px; overflow: hidden; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 74px; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(105px); opacity: .16; pointer-events: none; }
.hero-orb-one { width: 440px; height: 440px; top: 3%; right: 3%; background: var(--accent); }
.hero-orb-two { width: 360px; height: 360px; left: -6%; bottom: -8%; background: #456fb2; opacity: .11; }
.eyebrow { display: flex; align-items: center; gap: 11px; margin: 0 0 17px; color: var(--accent-strong); font-size: .74rem; font-weight: 900; letter-spacing: .18em; }
.eyebrow span { width: 30px; height: 1px; background: currentColor; }
.hero h1, .section-heading h2, .contact-copy h2 { margin: 0; line-height: 1.03; letter-spacing: -.05em; font-weight: 850; }
.hero h1 { font-size: clamp(3.7rem, 7.4vw, 7.15rem); max-width: 800px; }
.hero h1 span { color: var(--accent-strong); }
.hero-role { margin: 24px 0 14px; font-size: clamp(1rem, 1.55vw, 1.18rem); font-weight: 760; }
.hero-role i { color: var(--accent); font-style: normal; margin: 0 5px; }
.hero-text { max-width: 670px; margin: 0; color: var(--muted); font-size: 1.03rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 31px; }
.button {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid transparent; border-radius: 13px; padding: 0 18px; font-size: .86rem; font-weight: 800;
  cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: #111; }
.button-primary:hover { background: var(--accent-strong); color: var(--bg); }
.button-secondary { background: var(--surface); border-color: var(--line); }
.button-secondary:hover { border-color: var(--accent); }
.button-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.button-ghost:hover { color: var(--text); border-color: var(--accent); }
.hero-meta { display: flex; gap: 28px; margin-top: 43px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 640px; }
.hero-meta div { display: grid; gap: 3px; }
.hero-meta strong { font-size: 1.15rem; letter-spacing: -.03em; }
.hero-meta span { color: var(--muted); font-size: .74rem; }

.portrait-shell { position: relative; width: min(100%, 500px); margin-left: auto; }
.portrait-accent { position: absolute; inset: 7% -6% -7% 7%; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--accent-soft); transform: rotate(3deg); }
.portrait-frame { position: relative; overflow: hidden; aspect-ratio: 4 / 4.45; border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.portrait-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 58%, rgba(4,8,14,.26)); pointer-events: none; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.floating-card { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--header); backdrop-filter: blur(14px); box-shadow: var(--shadow-soft); }
.floating-card small { display: block; color: var(--muted); font-size: .68rem; }
.floating-card strong { display: block; font-size: .82rem; }
.floating-card-top { top: 7%; left: -9%; }
.floating-card-bottom { right: -7%; bottom: 8%; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #53b985; box-shadow: 0 0 0 5px rgba(83,185,133,.14); }
.scroll-cue { position: absolute; z-index: 3; left: 50%; bottom: 21px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.scroll-cue span { width: 18px; height: 29px; border: 1px solid var(--line); border-radius: 99px; position: relative; }
.scroll-cue span::after { content: ""; position: absolute; width: 3px; height: 5px; border-radius: 99px; background: var(--accent); left: 50%; top: 6px; transform: translateX(-50%); animation: scroll-dot 1.6s infinite; }
@keyframes scroll-dot { 0%,100% { transform: translate(-50%,0); opacity: .5; } 50% { transform: translate(-50%,9px); opacity: 1; } }

.section-heading { max-width: 700px; margin-bottom: 45px; }
.section-heading.centered { text-align: center; margin-inline: auto; }
.section-heading.centered .eyebrow { justify-content: center; }
.section-heading h2, .contact-copy h2 { font-size: clamp(2.5rem, 5vw, 4.65rem); }
.section-heading p:not(.eyebrow), .contact-copy > p { color: var(--muted); max-width: 620px; }
.section-heading.centered p:not(.eyebrow) { margin-inline: auto; }
.split-heading { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 50px; }
.split-heading > p { max-width: 420px; margin-bottom: 8px; }

.about-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 90px; align-items: start; }
.about-content .lead { margin-top: 0; color: var(--text); font-size: clamp(1.25rem, 2vw, 1.62rem); line-height: 1.48; font-weight: 640; letter-spacing: -.02em; }
.about-content > p:not(.lead) { color: var(--muted); }
.facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.facts-grid article { min-height: 108px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.facts-grid span { display: block; margin-bottom: 8px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.facts-grid strong { font-size: .9rem; }

.timeline { max-width: 900px; margin: 0 auto; }
.timeline-item { display: grid; grid-template-columns: 68px 1fr; gap: 26px; position: relative; padding-bottom: 28px; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 33px; top: 54px; bottom: -8px; width: 1px; background: var(--line); }
.timeline-marker { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.timeline-marker span { color: var(--accent-strong); font-size: .73rem; font-weight: 900; }
.timeline-card { padding: 29px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-soft); }
.tag { display: inline-flex; padding: 6px 9px; border: 1px solid var(--line); border-radius: 99px; background: var(--accent-soft); color: var(--accent-strong); font-size: .67rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.timeline-card h3, .skill-card h3, .project-card h3, .cert-card h3, .github-banner h3 { margin: 14px 0 9px; line-height: 1.18; letter-spacing: -.03em; }
.timeline-card h3 { font-size: 1.55rem; }
.timeline-card p, .skill-card p, .project-card p, .cert-card p, .github-banner p { color: var(--muted); }
.timeline-meta, .tech-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.timeline-meta span, .tech-list span { padding: 6px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: .68rem; font-weight: 750; }

.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skill-card { padding: 29px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.skill-card:hover { transform: translateY(-5px); border-color: rgba(217,167,94,.46); box-shadow: var(--shadow-soft); }
.skill-head { display: flex; align-items: center; gap: 16px; }
.skill-head > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); font-size: .72rem; font-weight: 900; }
.skill-head h3 { margin: 0; font-size: 1.3rem; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.chip-list span { padding: 7px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: .72rem; font-weight: 730; }

.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.project-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-soft); transition: transform .2s ease, border-color .2s ease; }
.project-card:hover { transform: translateY(-5px); border-color: rgba(217,167,94,.42); }
.project-preview { height: 270px; padding: 17px; background: linear-gradient(145deg, var(--accent-soft), rgba(67,105,163,.12)); border-bottom: 1px solid var(--line); }
.browser-bar { height: 31px; display: flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 11px 11px 0 0; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; }
.browser-bar i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: .52; }
.preview-dashboard, .preview-site { height: calc(100% - 31px); border: 1px solid var(--line); border-radius: 0 0 13px 13px; background: var(--surface-2); padding: 18px; }
.preview-dashboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preview-dashboard span { height: 46px; border-radius: 9px; background: var(--accent-soft); border: 1px solid var(--line); }
.preview-dashboard div { grid-column: span 3; border-radius: 9px; background: linear-gradient(90deg, var(--surface), var(--accent-soft)); border: 1px solid var(--line); }
.fake-nav { width: 100%; height: 20px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); }
.fake-hero { width: 100%; height: 92px; margin: 12px 0; border-radius: 10px; background: linear-gradient(125deg, var(--accent-soft), rgba(67,105,163,.15)); }
.fake-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.fake-cards span { height: 65px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); }
.project-content { padding: 28px; position: relative; }
.project-number { position: absolute; top: 27px; right: 29px; color: var(--muted); font-size: .72rem; font-weight: 900; letter-spacing: .08em; }
.project-card h3 { font-size: 1.55rem; max-width: 86%; }
.text-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 22px; color: var(--accent-strong); font-size: .82rem; font-weight: 850; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.github-banner { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.github-banner h3 { font-size: 1.45rem; }
.github-banner p { margin-bottom: 0; }

.certifications-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 75px; align-items: start; }
.cert-list { display: grid; gap: 14px; }
.cert-card { display: grid; grid-template-columns: 64px 1fr; gap: 19px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); transition: transform .2s ease, border-color .2s ease; }
.cert-card:hover { transform: translateX(5px); border-color: rgba(217,167,94,.44); }
.cert-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 17px; background: var(--accent-soft); color: var(--accent-strong); font-size: .76rem; font-weight: 900; border: 1px solid var(--line); }
.cert-card > div:last-child > span { color: var(--accent-strong); font-size: .67rem; font-weight: 850; text-transform: uppercase; letter-spacing: .09em; }
.cert-card h3 { margin-top: 6px; font-size: 1.3rem; }
.cert-card p { margin-bottom: 0; }

.contact-section { background: radial-gradient(circle at 10% 10%, var(--accent-soft), transparent 27%), var(--bg); }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; align-items: start; }
.contact-copy h2 { font-size: clamp(3rem, 6vw, 5rem); }
.contact-links { display: grid; margin-top: 32px; border-top: 1px solid var(--line); }
.contact-links a { display: grid; grid-template-columns: 105px 1fr; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); transition: color .18s ease; }
.contact-links a:hover strong { color: var(--accent-strong); }
.contact-links span { color: var(--muted); font-size: .72rem; }
.contact-links strong { font-size: .84rem; overflow-wrap: anywhere; }
.social-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.social-links a { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: .72rem; font-weight: 750; }
.social-links a:hover { color: var(--text); border-color: var(--accent); }

.contact-form { padding: 31px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-soft); }
.form-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 23px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.form-heading span { font-weight: 850; letter-spacing: -.02em; }
.form-heading small { color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: grid; gap: 8px; margin-bottom: 14px; font-size: .75rem; font-weight: 800; }
.contact-form input, .contact-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); padding: 13px 14px; outline: none; transition: border-color .18s ease, box-shadow .18s ease; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); opacity: .72; }
.contact-form textarea { resize: vertical; min-height: 145px; }
.honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
.form-footer { display: flex; align-items: center; gap: 16px; margin-top: 5px; }
.form-status { margin: 0; color: var(--muted); font-size: .75rem; }
.form-status.success { color: var(--success); }
.form-status.error { color: var(--danger); }
.form-note { margin: 18px 0 0; color: var(--muted); font-size: .7rem; }
.form-note a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }

.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 34px 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .7fr .8fr; align-items: end; gap: 30px; }
.footer-brand { margin-bottom: 14px; }
.site-footer p { max-width: 420px; margin: 0; color: var(--muted); font-size: .8rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 13px; justify-content: center; }
.footer-links a { color: var(--muted); font-size: .75rem; font-weight: 720; }
.footer-links a:hover { color: var(--text); }
.footer-copy { display: grid; text-align: right; color: var(--muted); font-size: .72rem; gap: 4px; }

.back-to-top { position: fixed; z-index: 999; right: 20px; bottom: 20px; width: 43px; height: 43px; border-radius: 13px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s ease, visibility .2s ease, transform .2s ease, border-color .2s ease; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1080px) {
  .nav { gap: 17px; }
  .nav a { font-size: .78rem; }
  .hero-grid { gap: 44px; }
  .about-grid, .certifications-layout, .contact-grid { gap: 50px; }
}

@media (max-width: 900px) {
  :root { --header-height: 70px; }
  .menu-button { display: block; }
  .nav {
    position: absolute; top: calc(100% + 1px); left: 20px; right: 20px;
    display: grid; gap: 0; padding: 9px; border: 1px solid var(--line); border-radius: 16px;
    background: var(--surface); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
  }
  .nav.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav a { padding: 12px 13px; border-radius: 9px; }
  .nav a::after { display: none; }
  .nav a.active { background: var(--accent-soft); color: var(--accent-strong); }
  .hero { min-height: auto; padding-top: 70px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { order: 1; }
  .hero-visual { order: 0; }
  .portrait-shell { width: min(78vw, 460px); margin-inline: auto; }
  .hero h1 { font-size: clamp(3.6rem, 12vw, 6.2rem); }
  .hero-text { max-width: 760px; }
  .scroll-cue { display: none; }
  .about-grid, .certifications-layout, .contact-grid { grid-template-columns: 1fr; }
  .section-heading { margin-bottom: 34px; }
  .skills-grid, .projects-grid { grid-template-columns: 1fr; }
  .split-heading { display: block; }
  .split-heading > p { max-width: 650px; }
  .footer-grid { grid-template-columns: 1fr; align-items: start; }
  .footer-links { justify-content: flex-start; }
  .footer-copy { text-align: left; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .section { padding: 82px 0; }
  .brand-copy small { display: none; }
  .hero { padding: 54px 0 70px; }
  .hero h1 { font-size: clamp(3.25rem, 16vw, 5rem); }
  .hero-role { line-height: 1.8; }
  .hero-role i { margin: 0 2px; }
  .hero-actions .button { flex: 1 1 auto; }
  .hero-meta { gap: 18px; flex-wrap: wrap; }
  .hero-meta div { min-width: 26%; }
  .portrait-shell { width: min(88vw, 430px); }
  .floating-card-top { left: -3%; top: 4%; }
  .floating-card-bottom { right: -2%; bottom: 6%; }
  .facts-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 48px 1fr; gap: 14px; }
  .timeline-marker { width: 48px; height: 48px; }
  .timeline-item:not(:last-child)::before { left: 23px; top: 45px; }
  .timeline-card, .skill-card, .project-content, .contact-form { padding: 22px; }
  .project-preview { height: 220px; }
  .github-banner { display: grid; }
  .cert-card { grid-template-columns: 52px 1fr; gap: 14px; padding: 20px; }
  .cert-icon { width: 52px; height: 52px; border-radius: 14px; }
  .contact-links a { grid-template-columns: 80px 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-heading { display: grid; }
  .form-footer { align-items: flex-start; flex-direction: column; }
}

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

/* =========================================================
   Link & social icon system
   ========================================================= */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.link-icon,
.external-icon,
.inline-external svg,
.contact-link-icon svg,
.contact-link-external,
.social-links svg,
.social-icon svg,
.footer-socials svg,
.footer-domain svg {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: currentColor;
}

.external-icon { width: .82em; height: .82em; opacity: .72; }

.inline-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
}
.inline-external svg { width: .88em; height: .88em; color: var(--accent-strong); }
.inline-external:hover { color: var(--accent-strong); }

.hero-socials {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
}
.social-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease;
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover {
  transform: translateY(-3px);
  color: var(--accent-strong);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Contact cards with visual icons */
.contact-links a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 13px;
}
.contact-link-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.contact-link-icon svg { width: 18px; height: 18px; }
.contact-link-copy { min-width: 0; display: grid; gap: 2px; }
.contact-link-copy small {
  color: var(--muted);
  font-size: .69rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.contact-link-copy strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.contact-link-arrow,
.contact-link-external {
  justify-self: end;
  color: var(--muted);
  transition: transform .18s ease, color .18s ease;
}
.contact-links a:hover .contact-link-arrow,
.contact-links a:hover .contact-link-external {
  color: var(--accent-strong);
  transform: translateX(2px);
}
.contact-link-external { width: 16px; height: 16px; fill: currentColor; }

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.social-links a > svg:first-child { width: 15px; height: 15px; }
.social-links .external-icon { margin-left: 1px; }

.footer-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 13px;
}
.footer-socials a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface);
  transition: color .18s ease, border-color .18s ease, transform .18s ease;
}
.footer-socials a:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.footer-socials svg { width: 15px; height: 15px; }
.footer-domain {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: var(--muted);
}
.footer-domain:hover { color: var(--accent-strong); }
.footer-domain svg { width: .8em; height: .8em; }

@media (max-width: 900px) {
  .footer-socials { justify-content: flex-start; }
  .footer-domain { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .hero-socials { margin-top: 15px; }
  .social-icon { width: 40px; height: 40px; }
  .contact-links a { grid-template-columns: 39px minmax(0, 1fr) 20px; gap: 10px; }
  .contact-link-icon { width: 39px; height: 39px; }
  .social-links { gap: 7px; }
  .social-links a { padding: 8px 9px; }
}

/* Specificity fix for contact icon color against legacy contact span rule */
.contact-links .contact-link-icon {
  color: var(--accent-strong);
  font-size: inherit;
}
