:root {
  --bg: #f4f6f8;
  --bg-deep: #e8edf3;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --ink: #10213d;
  --muted: #53657c;
  --line: rgba(24, 51, 85, .13);
  --accent: #1769e0;
  --accent-bright: #1769e0;
  --success: #23976a;
  --shadow: 0 1.25rem 3rem rgba(20, 45, 75, .09);
  --max-width: 76rem;
  --side: clamp(1.25rem, 5vw, 4.75rem);
  --display: "Trebuchet MS", "Segoe UI", sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: radial-gradient(circle at 80% 0%, rgba(23, 105, 224, .08), transparent 34rem), var(--bg); color: var(--ink); font-family: var(--body); font-size: 1rem; line-height: 1.65; }
body::before { background-image: linear-gradient(rgba(24, 51, 85, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(24, 51, 85, .025) 1px, transparent 1px); background-size: 42px 42px; content: ""; inset: 0; pointer-events: none; position: fixed; z-index: -1; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent-bright); }
:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 4px; }
.sr-only { height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { background: var(--accent-bright); color: var(--bg-deep); font-weight: 800; left: 1rem; padding: .65rem 1rem; position: fixed; top: -4rem; z-index: 20; }
.skip-link:focus { top: 1rem; }

.site-header { align-items: center; backdrop-filter: blur(18px); background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--line); display: flex; gap: 1.25rem; justify-content: space-between; margin: 0 auto; max-width: var(--max-width); padding: 1.15rem var(--side); position: sticky; top: 0; z-index: 10; }
.brand { color: var(--ink); font-family: var(--display); font-size: 1.35rem; font-weight: 900; letter-spacing: -.06em; text-decoration: none; }
.brand span, h1 span { color: var(--accent); }
nav { display: flex; gap: clamp(.85rem, 2.2vw, 1.75rem); margin-left: auto; }
nav a { color: var(--muted); font-size: .9rem; font-weight: 700; position: relative; text-decoration: none; }
nav a::after { background: var(--accent); bottom: -.45rem; content: ""; height: 2px; left: 0; position: absolute; transform: scaleX(0); transform-origin: left; transition: transform .2s ease; width: 100%; }
nav a:hover::after, nav a.is-active::after { transform: scaleX(1); }
nav a:hover, nav a.is-active { color: var(--ink); }
.header-actions { align-items: center; display: flex; gap: .75rem; }
.header-cv { background: var(--accent); border-radius: .5rem; color: #fff; font-size: .82rem; font-weight: 800; padding: .62rem .85rem; text-decoration: none; }
.header-cv:hover { background: #1258bc; color: #fff; }
.menu-toggle { display: none; }

main, footer { margin: 0 auto; max-width: var(--max-width); }
.hero { align-items: center; background: rgba(255, 255, 255, .88); border: 1px solid var(--line); border-radius: 1.25rem; display: grid; gap: clamp(2rem, 8vw, 7rem); grid-template-columns: minmax(0, 1.45fr) minmax(15rem, .55fr); margin: 2rem var(--side) 0; min-height: min(42rem, calc(100vh - 5rem)); padding: clamp(3rem, 8vw, 6rem); }
.eyebrow, .section-label, .panel-label, .project-topline, .education-years { color: var(--accent-bright); font-size: .78rem; font-weight: 800; letter-spacing: .13em; margin: 0 0 1.15rem; text-transform: uppercase; }
.availability-dot { background: var(--success); border-radius: 999px; box-shadow: 0 0 0 .22rem rgba(35, 151, 106, .12); display: inline-block; height: .48rem; margin: 0 .55rem .04rem 0; width: .48rem; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); line-height: .98; }
h1 { font-size: clamp(4rem, 11vw, 8.2rem); letter-spacing: -.075em; margin-bottom: 1.75rem; }
.hero-role { font-size: clamp(1.35rem, 2.3vw, 1.8rem); line-height: 1.38; margin-bottom: 1rem; max-width: 43rem; }
.hero-summary { color: var(--muted); font-size: 1.08rem; max-width: 38rem; }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button { align-items: center; border-radius: .55rem; display: inline-flex; font-size: .93rem; font-weight: 800; gap: .7rem; justify-content: center; padding: .85rem 1.05rem; text-decoration: none; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.button:hover { box-shadow: 0 .65rem 1.5rem rgba(0, 0, 0, .18); transform: translateY(-2px); }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: #1258bc; color: #fff; }
.button-secondary { background: #fff; border: 1px solid rgba(23, 105, 224, .55); color: var(--accent); font: inherit; }
.button-secondary:hover { border-color: var(--accent); }
.hero-panel { background: #f8fafc; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 1rem; box-shadow: var(--shadow); padding: 1.5rem; }
.profile-photo-wrap { background: var(--bg-deep); border: 1px solid var(--line); border-radius: .75rem; margin: -.25rem -.25rem 1.5rem; overflow: hidden; }
.profile-photo { aspect-ratio: .78; display: block; object-fit: cover; object-position: center 15%; width: 100%; }
.panel-value { font-size: 1.05rem; font-weight: 700; line-height: 1.35; margin-bottom: 0; }
.panel-rule { border-top: 1px solid var(--line); margin: 1.25rem 0; }

.section { border-top: 1px solid var(--line); display: grid; gap: 3rem; grid-template-columns: minmax(9rem, .3fr) minmax(0, 1fr); padding: clamp(4rem, 9vw, 7rem) var(--side); }
.section-label { margin-bottom: 0; }
.section-body h2 { font-size: clamp(2.25rem, 5.2vw, 4.45rem); letter-spacing: -.055em; margin-bottom: 1.5rem; max-width: 17ch; }
.about-copy { display: grid; gap: 1.1rem; max-width: 48rem; }
.about-copy p { color: var(--muted); font-size: 1.1rem; margin-bottom: 0; }
.about-highlights { display: grid; gap: 1px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2.5rem; max-width: 53rem; }
.about-highlights > div { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: .7rem; padding: 1.1rem 1.15rem; }
.about-highlights span { color: var(--accent-bright); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.about-highlights p { font-size: .97rem; font-weight: 750; line-height: 1.4; margin: .45rem 0 0; }
.skills-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 2.5rem; }
.skill-group { background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; box-shadow: 0 .5rem 1.5rem rgba(20, 45, 75, .035); padding: 1.4rem; transition: background .2s ease, transform .2s ease; }
.skill-group:hover { background: var(--surface-soft); transform: translateY(-3px); }
.skill-group h3 { font-family: var(--body); font-size: .8rem; letter-spacing: .1em; margin-bottom: 1.35rem; text-transform: uppercase; }
.skill-group ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.skill-group li { background: #f8fafc; border: 1px solid var(--line); border-radius: .35rem; color: var(--muted); font-size: .92rem; padding: .32rem .55rem; }

.timeline { list-style: none; margin: 2.7rem 0 0; padding: 0; }
.timeline-entry { border-top: 1px solid var(--line); display: grid; gap: 1.5rem; grid-template-columns: minmax(9rem, .36fr) minmax(0, 1fr); padding: 1.6rem 0; }
.timeline-entry:last-child { border-bottom: 1px solid var(--line); }
.timeline-meta { color: var(--accent-bright); display: flex; flex-direction: column; font-size: .82rem; font-weight: 750; gap: .25rem; }
.timeline-entry h3 { font-size: clamp(1.45rem, 2.3vw, 2rem); letter-spacing: -.03em; margin-bottom: .8rem; }
.timeline-entry h3 span { color: var(--muted); font-family: var(--body); font-size: .56em; font-weight: 600; letter-spacing: 0; }
.timeline-entry p, .section-heading p { color: var(--muted); margin-bottom: 0; }

.section-heading { align-items: end; display: flex; flex-wrap: wrap; gap: 1rem 3rem; justify-content: space-between; }
.section-heading p { max-width: 26rem; }
.project-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 2.6rem; }
.project-card { background: var(--surface); border: 1px solid var(--line); border-radius: .85rem; box-shadow: 0 .5rem 1.5rem rgba(20, 45, 75, .035); display: flex; flex-direction: column; min-height: 20rem; padding: clamp(1.35rem, 3vw, 2rem); transition: background .25s ease, box-shadow .25s ease, transform .25s ease; }
.project-card:hover { background: var(--surface-soft); box-shadow: var(--shadow); transform: translateY(-4px); z-index: 1; }
.project-card-featured { grid-column: span 2; min-height: 25rem; }
.project-topline { color: var(--muted); display: flex; justify-content: space-between; margin-bottom: auto; }
.project-index { color: var(--accent-bright); }
.project-card h3 { font-size: clamp(1.7rem, 3.5vw, 2.85rem); letter-spacing: -.045em; margin: 3rem 0 .65rem; }
.project-card p { color: var(--muted); margin-bottom: 0; }
.project-tech { color: var(--accent-bright) !important; font-size: .82rem; font-weight: 750; letter-spacing: .04em; margin-bottom: 1rem !important; }
.case-study { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 2rem; }
.case-study > div { border-top: 1px solid var(--line); padding-top: .85rem; }
.case-study span { color: var(--accent-bright); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.case-study p { color: var(--ink); font-size: .94rem; line-height: 1.45; margin-top: .3rem; }

.education-card { align-items: end; display: flex; flex-wrap: wrap; gap: 1rem 3rem; justify-content: space-between; }
.education-card h2 { margin-bottom: 0; }
.education-card > p { color: var(--muted); font-size: 1.1rem; margin-bottom: .2rem; }
.contact-section { background: radial-gradient(circle at 90% 15%, rgba(23, 105, 224, .12), transparent 25rem), #eaf2fd; border-top: 1px solid var(--line); margin-top: 2rem; padding: clamp(4rem, 9vw, 7rem) var(--side); }
.contact-section h2 { font-size: clamp(3rem, 7vw, 5.8rem); letter-spacing: -.07em; margin-bottom: 1rem; }
.contact-section > p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; }
.contact-email, .contact-linkedin { font-size: clamp(1.05rem, 2.2vw, 1.35rem); font-weight: 800; }
.contact-email { text-decoration-color: var(--accent); }
.contact-details { border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; margin-top: 3rem; padding-top: 1rem; }
footer { border-top: 1px solid var(--line); color: var(--muted); display: flex; font-size: .86rem; justify-content: space-between; padding: 1.3rem var(--side); }

@media (max-width: 48rem) {
  .site-header { padding-bottom: 1rem; padding-top: 1rem; }
  .header-cv { display: none; }
  .menu-toggle { background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer; display: block; font: inherit; font-size: .78rem; font-weight: 800; letter-spacing: .08em; padding: .42rem .6rem; text-transform: uppercase; }
  nav { background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 0; left: var(--side); padding: .5rem; position: absolute; right: var(--side); top: calc(100% + .5rem); z-index: 5; }
  html.js-enabled nav { display: none; }
  nav.is-open { display: flex; }
  nav a { padding: .7rem; }
  .hero { align-items: start; grid-template-columns: 1fr; margin: 1rem var(--side) 0; min-height: 0; padding-bottom: 3rem; padding-top: 3rem; }
  .hero-panel { max-width: 26rem; }
  .section { gap: 1.2rem; grid-template-columns: 1fr; }
  .skills-grid, .project-grid { grid-template-columns: 1fr; }
  .project-card-featured { grid-column: auto; }
  .timeline-entry { grid-template-columns: 1fr; }
  .timeline-meta { flex-direction: row; flex-wrap: wrap; }
  .case-study, .about-highlights { grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-direction: column; gap: .5rem; }
}

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