:root {
  --paper: #f8f0d9;
  --ink: #171717;
  --card: #fff9e9;
  --tomato: #ff6242;
  --yellow: #ffd84d;
  --mint: #4bd6a2;
  --sky: #66b7ff;
  --lilac: #b98cff;
  --pink: #ff82b2;
  --shadow: 8px 8px 0 var(--ink);
  --shadow-lg: 12px 12px 0 var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: radial-gradient(rgba(23, 23, 23, 0.08) 1px, transparent 1px), linear-gradient(135deg, #fff7df 0%, #f3e6ca 100%);
  background-size: 22px 22px, auto;
}
a { color: inherit; text-decoration: none; }
button, a { font: inherit; }
:focus-visible { outline: 4px solid #005fcc; outline-offset: 4px; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; background: var(--ink); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px clamp(16px, 4vw, 56px); border-bottom: 2px solid var(--ink); background: rgba(248, 240, 217, 0.94); backdrop-filter: blur(14px); }
.brand { display: grid; flex: 0 0 auto; width: 48px; height: 48px; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); font-family: "JetBrains Mono", monospace; font-weight: 700; box-shadow: 4px 4px 0 var(--ink); }
nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
nav a, .filter-button { border: 2px solid var(--ink); border-radius: 999px; background: var(--card); padding: 8px 13px; font-weight: 700; }

.section { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 88px 0; }
.hero { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(310px, 0.88fr); align-items: center; gap: clamp(36px, 6vw, 72px); min-height: calc(100vh - 82px); }
h1, h2, h3, h4 { margin: 0; font-family: "Fraunces", Georgia, serif; letter-spacing: 0; }
h1 { max-width: 900px; margin-top: 18px; font-size: clamp(2.8rem, 4.2vw, 4.5rem); line-height: 0.96; }
h2 { margin-top: 18px; font-size: clamp(2.5rem, 5.6vw, 5rem); line-height: 0.98; }
h3 { font-size: 1.6rem; line-height: 1.08; }
h4 { font-family: "Space Grotesk", sans-serif; font-size: 1rem; line-height: 1.4; }
p, li { font-size: 1.03rem; line-height: 1.65; }
.hero-copy > p, .about-text, .contact p { color: #4a4038; }
.availability { max-width: 720px; font-weight: 700; }

.chip { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 999px; padding: 6px 12px; font-family: "JetBrains Mono", monospace; font-size: 0.8rem; font-weight: 700; }
.yellow { background: var(--yellow); }.tomato { background: var(--tomato); }.mint { background: var(--mint); }.sky { background: var(--sky); }.lilac { background: var(--lilac); }.pink { background: var(--pink); }
.hero-actions, .contact-actions, .project-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--ink); border-radius: 999px; padding: 12px 20px; font-weight: 800; box-shadow: 5px 5px 0 var(--ink); transition: transform 180ms ease, box-shadow 180ms ease; }
.button.primary { background: var(--ink); color: white; }.button.secondary, .button.compact, .button.small { background: var(--card); }
.button.compact, .button.small { padding: 9px 15px; }.button.small { box-shadow: 3px 3px 0 var(--ink); font-size: 0.86rem; }
.button.disabled { cursor: not-allowed; background: #ddd3ba; color: #5f594f; box-shadow: none; }
nav a:hover, .button:not(.disabled):hover, .filter-button:hover, .project-card:hover, .skill-card:hover, .mini-card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 32px; max-width: 650px; }
.metrics div { border: 2px solid var(--ink); border-radius: 18px; background: var(--card); padding: 15px; box-shadow: 4px 4px 0 var(--ink); }
.metrics strong { display: block; font-family: "Fraunces", serif; font-size: 1.55rem; }.metrics span { display: block; margin-top: 4px; color: #5d5147; font-size: 0.85rem; }

.hero-visual { position: relative; min-height: 520px; }
.pop-card, .project-card, .skill-card, .mini-card { border: 2px solid var(--ink); border-radius: 24px; box-shadow: var(--shadow); }
.portrait-card { position: absolute; inset: 50px 22px auto; padding: 22px; background: var(--card); transform: rotate(2deg); animation: floaty 5s ease-in-out infinite; }
.portrait-card img { display: block; width: 100%; aspect-ratio: 1; border: 2px solid var(--ink); border-radius: 22px; object-fit: cover; background: white; }
.status-pill { margin-top: 15px; border: 2px solid var(--ink); border-radius: 999px; background: var(--yellow); padding: 9px 12px; text-align: center; font-weight: 800; }
.orbit-card { position: absolute; border: 2px solid var(--ink); border-radius: 18px; padding: 13px 16px; font-family: "JetBrains Mono", monospace; font-weight: 800; box-shadow: 5px 5px 0 var(--ink); animation: bob 4s ease-in-out infinite; }
.card-rag { top: 18px; right: 0; background: var(--mint); }.card-agents { bottom: 90px; left: 0; background: var(--pink); animation-delay: 500ms; }.card-data { right: 8px; bottom: 22px; background: var(--sky); animation-delay: 900ms; }

.marquee { width: 100%; overflow: hidden; border-block: 2px solid var(--ink); background: var(--ink); color: var(--paper); padding: 16px 0; }
.marquee-track { display: flex; width: max-content; gap: 30px; align-items: center; white-space: nowrap; animation: marquee 34s linear infinite; }
.marquee span { font-family: "Fraunces", serif; font-size: clamp(1.8rem, 4vw, 3.2rem); font-weight: 850; font-style: italic; }.marquee b { color: var(--yellow); font-size: 2rem; }

.expertise-grid, .skills-grid, .projects-grid, .education-grid { display: grid; gap: 22px; margin-top: 34px; }
.expertise-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }.skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini-card, .skill-card { padding: 24px; transition: transform 180ms ease, box-shadow 180ms ease; }
.mini-card p, .skill-card p { margin-bottom: 0; }
.two-column { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 56px; }.about-text p:first-child { margin-top: 0; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }.section-heading h2 { max-width: 850px; }
.project-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter-button { cursor: pointer; transition: transform 180ms ease, box-shadow 180ms ease; }.filter-button.is-active { background: var(--ink); color: white; }
.projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-card { display: flex; min-height: 520px; flex-direction: column; padding: 26px; transition: transform 180ms ease, box-shadow 180ms ease; }
.project-card--primary { min-height: 570px; }.project-card h3 { margin-top: 26px; font-size: clamp(1.9rem, 3vw, 2.75rem); }.project-card h4 { margin-top: 8px; }
.project-card > p { color: rgba(23,23,23,.82); }.project-card ul { margin: 0 0 18px; padding-left: 20px; }
.project-topline { display: flex; justify-content: space-between; gap: 12px; align-items: start; }.project-topline > span { border: 2px solid var(--ink); border-radius: 999px; background: var(--card); padding: 5px 10px; font-family: "JetBrains Mono", monospace; font-size: .74rem; font-weight: 800; }.project-topline small { max-width: 52%; text-align: right; font-weight: 700; }
.technology-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }.technology-tags span { border: 1.5px solid var(--ink); border-radius: 999px; background: rgba(255,249,233,.84); padding: 5px 9px; font-family: "JetBrains Mono", monospace; font-size: .72rem; font-weight: 700; }
.project-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }.project-metrics strong { border-left: 3px solid var(--ink); padding-left: 8px; font-size: .82rem; }
.project-actions { margin-top: 20px; }

.education-grid { grid-template-columns: 1.35fr .85fr; }.education-card { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; background: var(--card); padding: 30px; }.education-card h2 { margin-top: 0; font-size: clamp(1.8rem, 3.3vw, 3rem); }.school-mark { display: grid; width: 92px; height: 92px; place-items: center; border: 2px solid var(--ink); border-radius: 22px; background: var(--yellow); font-family: "Fraunces", serif; font-size: 1.6rem; font-weight: 850; }.certification .school-mark { background: var(--mint); }.muted { color: #5d5147; }

.contact-panel { position: relative; overflow: hidden; min-height: 500px; background: radial-gradient(circle at 98% 2%, rgba(255,98,66,.72), transparent 28%), radial-gradient(circle at 0 100%, rgba(185,140,255,.72), transparent 32%), linear-gradient(135deg,#1d1d22,#171719 56%,#1a1a20); color: var(--paper); padding: clamp(44px,7vw,82px); }
.contact-panel h2 { max-width: 1000px; color: var(--paper); font-size: clamp(3rem,6.5vw,6rem); }.contact-panel h2 em { color: var(--yellow); }.contact-panel p { max-width: 850px; color: rgba(248,240,217,.78); font-size: clamp(1.05rem,2vw,1.3rem); font-weight: 600; }.contact-email { background: var(--yellow); color: var(--ink); }.contact-github { background: var(--paper); color: var(--ink); }.contact-linkedin { background: var(--sky); color: var(--ink); }

.case-study-dialog { width: min(900px, calc(100% - 28px)); max-height: calc(100vh - 36px); overflow: auto; border: 3px solid var(--ink); border-radius: 24px; background: var(--paper); color: var(--ink); padding: clamp(28px,5vw,56px); box-shadow: 14px 14px 0 var(--ink); }.case-study-dialog::backdrop { background: rgba(23,23,23,.72); }.case-study-dialog h2 { margin-right: 30px; }.case-study-dialog section { border-top: 2px solid var(--ink); margin-top: 24px; padding-top: 20px; }.case-study-dialog h3 { font-size: 1.45rem; }.case-study-subtitle { color: #5d5147; font-weight: 700; }.dialog-close { position: sticky; float: right; top: 0; z-index: 2; width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); cursor: pointer; font-size: 1.6rem; font-weight: 800; }

@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(2deg); } 50% { transform: translateY(-14px) rotate(-1deg); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 520ms ease, transform 520ms ease; }.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 940px) {
  .site-header { align-items: flex-start; }.hero, .two-column, .education-grid { grid-template-columns: 1fr; }.hero { padding-top: 52px; }.expertise-grid, .skills-grid { grid-template-columns: 1fr; }.hero-visual { min-height: 470px; }
}
@media (max-width: 760px) {
  .site-header { position: relative; flex-direction: column; }.projects-grid { grid-template-columns: 1fr; }.project-card, .project-card--primary { min-height: 0; }.technology-tags { margin-top: 18px; }.section-heading { align-items: flex-start; flex-direction: column; }.metrics { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  nav a { padding: 7px 9px; font-size: .82rem; }.section { width: min(100% - 24px,1180px); padding: 64px 0; }.portrait-card { inset-inline: 0; }.orbit-card { font-size: .76rem; }.education-card { grid-template-columns: 1fr; }.project-topline { flex-direction: column; }.project-topline small { max-width: none; text-align: left; }.hero-actions .button { width: 100%; }
}
@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; }
}
