:root {
  --bg: #0b0d12;
  --surface: #11141b;
  --surface-2: #171b24;
  --text: #f7f4ec;
  --muted: #a8adbb;
  --line: rgba(255,255,255,.11);
  --accent: #d8aa5b;
  --accent-2: #66d4c2;
  --header: rgba(11,13,18,.82);
  --shadow: 0 24px 80px rgba(0,0,0,.32);
  --max: 1180px;
}

:root[data-theme='light'] {
  --bg: #f5f3ed;
  --surface: #fffdf8;
  --surface-2: #ebe7de;
  --text: #17191f;
  --muted: #5f6571;
  --line: rgba(20,22,28,.12);
  --accent: #9b6a1b;
  --accent-2: #167d70;
  --header: rgba(245,243,237,.84);
  --shadow: 0 24px 70px rgba(44,38,23,.12);
}

* { 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.6; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #111; }

.skip-link { position: fixed; top: -80px; left: 16px; z-index: 999; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 16px; }

.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 0 max(24px, calc((100vw - var(--max)) / 2)); background: var(--header); border-bottom: 1px solid var(--line); backdrop-filter: blur(20px); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 225px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--accent-2) 12%, transparent)); color: var(--text); font-size: 14px; font-weight: 850; letter-spacing: .08em; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.12; }
.brand strong { font-size: 14px; letter-spacing: .01em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 5px; text-transform: uppercase; letter-spacing: .13em; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav button { border: 0; color: var(--muted); background: transparent; cursor: pointer; padding: 10px 12px; font-size: 13px; font-weight: 650; border-radius: 9px; transition: .2s ease; }
.nav button:hover { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .menu-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 11px; cursor: pointer; transition: .2s ease; }
.icon-button:hover, .menu-button:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.text-toggle { font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.menu-button { display: none; }

main { overflow: hidden; }
.container { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.section { padding: 118px 0; border-top: 1px solid var(--line); }
.section-heading { max-width: 760px; margin-bottom: 50px; }
.section-heading.center { margin-inline: auto; text-align: center; }
.eyebrow, .hero-eyebrow { color: var(--accent); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .21em; }
.section-heading h2 { margin: 15px 0 18px; max-width: 900px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 5vw, 68px); line-height: 1.03; letter-spacing: -.04em; font-weight: 600; }
.section-heading p { color: var(--muted); max-width: 690px; margin: 0; font-size: 18px; }

.hero { position: relative; min-height: 100vh; padding: 150px max(24px, calc((100vw - var(--max)) / 2)) 80px; display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: 72px; }
.hero-grid-bg { position: absolute; inset: 0; opacity: .43; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 58px 58px; mask-image: radial-gradient(circle at 75% 42%, black, transparent 67%); }
.hero-copy, .hero-visual { position: relative; z-index: 1; }
.availability { width: fit-content; display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; padding: 8px 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); border-radius: 999px; margin-bottom: 28px; }
.availability span { width: 8px; height: 8px; background: var(--accent-2); border-radius: 50%; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-2) 15%, transparent); }
.hero h1 { margin: 14px 0 24px; font-family: Georgia, "Times New Roman", serif; font-weight: 600; letter-spacing: -.055em; font-size: clamp(53px, 6.4vw, 91px); line-height: .98; }
.hero h1 em { color: var(--muted); font-style: normal; }
.hero-lead { color: var(--muted); max-width: 760px; font-size: clamp(17px, 2vw, 20px); margin: 0 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.button { min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; font-weight: 750; font-size: 14px; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.button.secondary { background: var(--surface); color: var(--text); }
.button.ghost { background: transparent; color: var(--muted); }
.button.ghost:hover, .button.secondary:hover { border-color: var(--accent); color: var(--text); }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; color: var(--muted); font-size: 12px; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { color: var(--accent-2); }

.hero-visual { min-height: 560px; display: grid; place-items: center; }
.hero-visual::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%); filter: blur(3px); }
.orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.orbit-a { width: 460px; height: 460px; animation: spin 28s linear infinite; }
.orbit-b { width: 325px; height: 325px; border-style: dashed; animation: spin 19s linear infinite reverse; }
.main-card { position: relative; z-index: 4; width: min(440px, 92%); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); border-radius: 18px; box-shadow: var(--shadow); transform: rotate(-2deg); overflow: hidden; }
.code-head { height: 46px; padding: 0 16px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--line); }
.code-head > span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.code-head small { color: var(--muted); margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.main-card pre { margin: 0; padding: 30px 26px 36px; color: var(--text); white-space: pre-wrap; font-size: clamp(12px, 1.2vw, 15px); line-height: 1.9; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-purple { color: #bd93f9; }.code-green { color: #87d7af; }
.floating-chip { position: absolute; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font-size: 12px; font-weight: 750; }
.chip-one { left: -8px; top: 120px; transform: rotate(-5deg); }.chip-two { right: -12px; bottom: 110px; transform: rotate(4deg); }
.monogram { position: absolute; z-index: 6; right: 20px; top: 60px; width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; color: #17130c; font-family: Georgia, serif; font-size: 23px; font-weight: 800; background: linear-gradient(135deg, #f0d19b, var(--accent)); box-shadow: 0 18px 50px color-mix(in srgb, var(--accent) 25%, transparent); }
@keyframes spin { to { transform: rotate(360deg); } }

.services { background: var(--surface); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.service-card { position: relative; min-height: 290px; padding: 28px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; transition: .25s ease; }
.service-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card-number { position: absolute; top: 24px; right: 24px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 11px; }
.service-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); margin-bottom: 52px; }
.service-card h3 { margin: 0 0 12px; font-size: 20px; }
.service-card p { margin: 0; color: var(--muted); font-size: 14px; }

.projects-section { background: var(--bg); }
.projects-list { display: grid; gap: 32px; }
.project-card { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 510px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); overflow: hidden; }
.project-card:nth-child(even) .project-media { order: 2; }
.project-card:nth-child(even) .project-content { order: 1; }
.project-media { position: relative; min-height: 440px; overflow: hidden; background: var(--surface-2); }
.project-media::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); pointer-events: none; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project-card:hover .project-media img { transform: scale(1.025); }
.project-index { position: absolute; left: 20px; bottom: 20px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: rgba(10,12,16,.78); color: #fff; font-family: ui-monospace, monospace; font-size: 12px; backdrop-filter: blur(10px); }
.project-content { padding: 50px; display: flex; flex-direction: column; justify-content: center; }
.project-type { margin: 0 0 13px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.project-content h3 { margin: 0 0 17px; font-family: Georgia, serif; font-size: clamp(32px, 3.5vw, 47px); line-height: 1.03; letter-spacing: -.035em; }
.project-summary { color: var(--muted); font-size: 16px; margin: 0 0 19px; }
.impact { display: grid; grid-template-columns: auto 1fr; gap: 10px; color: var(--text); border-left: 2px solid var(--accent); padding: 10px 0 10px 15px; font-size: 13px; margin-bottom: 24px; }
.impact strong { color: var(--accent); }
.stack { display: flex; flex-wrap: wrap; gap: 7px; }
.stack span { padding: 6px 9px; border: 1px solid var(--line); color: var(--muted); background: var(--bg); border-radius: 7px; font-size: 11px; font-weight: 700; }
.project-links { margin-top: 27px; display: flex; align-items: center; gap: 15px; }
.project-links a { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; }
.project-links a:hover { color: var(--accent); }
.project-note { color: var(--muted); font-size: 12px; }

.approach { background: var(--surface); }
.approach-wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: start; }
.steps { border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 58px 1fr; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.step > span { color: var(--accent); font-family: ui-monospace, monospace; font-size: 12px; }
.step h3 { margin: 0 0 7px; font-size: 20px; }.step p { margin: 0; color: var(--muted); font-size: 14px; }

.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 90px; align-items: start; }
.about-copy > p { color: var(--muted); font-size: 17px; max-width: 690px; }
.social-row { display: flex; gap: 10px; margin-top: 28px; }
.social-row a { display: inline-flex; align-items: center; gap: 8px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 750; }
.social-row a:hover { border-color: var(--accent); }
.about-panels { display: grid; gap: 13px; }
.info-panel { padding: 28px; border: 1px solid var(--line); background: var(--surface); border-radius: 15px; }
.panel-label { display: block; color: var(--accent); margin-bottom: 14px; text-transform: uppercase; font-size: 10px; font-weight: 850; letter-spacing: .18em; }
.info-panel h3 { margin: 0 0 8px; font-size: 19px; }.info-panel p { margin: 0; color: var(--muted); font-size: 13px; }
.info-panel .cert + .cert { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.languages-panel div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.languages-panel span { color: var(--muted); font-size: 13px; }

.skills { background: var(--surface); }
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.skill-group { padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.skill-group h3 { margin: 0 0 20px; font-size: 16px; }
.skill-group div { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-group span { color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; font-size: 13px; }

.contact { background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--surface) 85%, var(--bg))); }
.contact-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 80px; align-items: start; }
.direct-contact { margin-top: 36px; display: grid; gap: 10px; }
.direct-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .15em; margin-bottom: 4px; }
.direct-contact button, .direct-contact a, .direct-contact > div { min-height: 48px; width: 100%; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); padding: 10px 13px; text-align: left; cursor: pointer; }
.direct-contact button span, .direct-contact a span, .direct-contact div span { flex: 1; font-size: 13px; }.direct-contact svg { color: var(--accent); }
.contact-form { padding: 32px; border: 1px solid var(--line); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.contact-form label { display: grid; gap: 7px; margin-bottom: 17px; }.contact-form label span { color: var(--muted); font-size: 12px; font-weight: 700; }
.contact-form input, .contact-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); padding: 12px 13px; outline: none; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.contact-form .button { width: 100%; margin-top: 3px; }
.form-note { margin: 12px 0 0; color: var(--muted); text-align: center; font-size: 11px; }

footer { padding: 38px 0; border-top: 1px solid var(--line); background: var(--bg); }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr auto; gap: 30px; align-items: center; }
.footer-inner > div { display: flex; align-items: center; gap: 12px; }.footer-inner p { color: var(--muted); font-size: 11px; margin: 0; }.footer-inner a { font-size: 12px; font-weight: 800; }
.toast { position: fixed; z-index: 300; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 11px 16px; border: 1px solid var(--line); background: var(--text); color: var(--bg); border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; font-weight: 800; }

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

@media (max-width: 1020px) {
  .nav { position: fixed; left: 18px; right: 18px; top: 88px; display: none; padding: 12px; flex-direction: column; align-items: stretch; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
  .nav.open { display: flex; }.nav button { text-align: left; padding: 13px; }.menu-button { display: grid; }
  .brand { min-width: 0; }.brand small { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 135px; gap: 10px; }.hero-copy { max-width: 820px; }.hero-visual { min-height: 500px; }
  .services-grid, .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card, .project-card:nth-child(even) { grid-template-columns: 1fr; }.project-card:nth-child(even) .project-media, .project-card:nth-child(even) .project-content { order: initial; }.project-media { min-height: 420px; }
  .approach-wrap, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 45px; }
  .approach-wrap .section-heading { margin-bottom: 0; }
}

@media (max-width: 680px) {
  .site-header { height: 70px; padding-inline: 16px; }.brand > span:last-child { display: none; }.brand-mark { width: 39px; height: 39px; }
  .container { width: min(100% - 32px, var(--max)); }.section { padding: 82px 0; }
  .hero { padding: 115px 16px 62px; min-height: auto; }.hero h1 { font-size: clamp(45px, 14vw, 69px); }.hero-actions { align-items: stretch; }.hero-actions .button { width: 100%; }
  .hero-visual { min-height: 390px; }.orbit-a { width: 340px; height: 340px; }.orbit-b { width: 255px; height: 255px; }.main-card { width: 94%; }.floating-chip { font-size: 10px; padding: 8px 10px; }.chip-one { left: 0; top: 75px; }.chip-two { right: 0; bottom: 62px; }.monogram { width: 58px; height: 58px; font-size: 18px; top: 40px; right: 6px; }
  .trust-row { display: grid; gap: 10px; }.section-heading { margin-bottom: 35px; }.section-heading h2 { font-size: 40px; }.section-heading p { font-size: 16px; }
  .services-grid, .skills-grid { grid-template-columns: 1fr; }.service-card { min-height: 250px; }.service-icon { margin-bottom: 35px; }
  .project-media { min-height: 280px; }.project-content { padding: 28px 22px 32px; }.project-content h3 { font-size: 34px; }
  .languages-panel div { grid-template-columns: 1fr; }.social-row { flex-direction: column; }.social-row a { justify-content: center; }
  .contact-form { padding: 22px; }.footer-inner { grid-template-columns: 1fr; text-align: left; }.footer-inner > div { align-items: flex-start; }
}

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