:root {
  --bg: #070b14;
  --bg-alt: #0a1020;
  --surface: rgba(15, 23, 42, .72);
  --surface-strong: #111a2d;
  --border: rgba(148, 163, 184, .16);
  --text: #f8fafc;
  --muted: #9aa7bb;
  --blue: #4d8dff;
  --blue-2: #2755ee;
  --cyan: #59c7ff;
  --radius: 22px;
  --shadow: 0 26px 70px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 5%, rgba(39,85,238,.08), transparent 25rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.section { padding: 112px 0; position: relative; }
.section-tight { padding-top: 72px; }
.section-alt { border-block: 1px solid var(--border); background: rgba(10,16,32,.58); }
.page-glow { position: fixed; width: 420px; height: 420px; border-radius: 999px; filter: blur(100px); opacity: .12; pointer-events: none; z-index: -1; }
.page-glow-one { background: #2864ff; top: -220px; right: -100px; }
.page-glow-two { background: #1441c9; left: -260px; top: 45vh; }

.site-header { position: sticky; top: 0; z-index: 30; background: rgba(7,11,20,.72); border-bottom: 1px solid transparent; backdrop-filter: blur(18px); }
.site-header.scrolled { border-color: var(--border); }
.nav-wrap { min-height: 76px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; letter-spacing: -.02em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(145deg, #2348c7 0%, #4d78ff 48%, #252c94 100%);
  border: 1px solid rgba(255,255,255,.16); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 25px rgba(39,85,238,.25);
  font-weight: 900; font-style: italic; letter-spacing: -.08em; color: white;
}
.main-nav { display: flex; align-items: center; gap: 29px; font-size: 14px; color: #c2ccda; }
.main-nav a { transition: color .2s ease; }
.main-nav a:hover { color: #fff; }
.nav-cta { border: 1px solid rgba(77,141,255,.5); color: #dbe9ff !important; padding: 9px 14px; border-radius: 9px; }
.menu-toggle { display: none; width: 42px; height: 42px; background: transparent; border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.menu-toggle span { display: block; height: 2px; background: #dce7f7; margin: 4px 0; }

.hero { padding-top: 126px; min-height: 760px; display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: 88px; align-items: center; }
.eyebrow { margin: 0 0 15px; color: var(--blue); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(54px, 7vw, 86px); line-height: .98; letter-spacing: -.055em; }
.hero-role { font-size: clamp(24px, 3vw, 34px); margin: 19px 0 17px; color: #dce4f0; letter-spacing: -.035em; }
.hero-description { max-width: 660px; color: var(--muted); font-size: 18px; margin: 0; }
.hero-actions, .contact-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.button { min-height: 48px; padding: 0 19px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; font-size: 14px; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: linear-gradient(135deg, var(--blue-2), #397cff); box-shadow: 0 12px 30px rgba(39,85,238,.24); }
.button.secondary { background: rgba(255,255,255,.025); border-color: var(--border); color: #e4ebf5; }
.hero-links { margin-top: 26px; display: flex; gap: 22px; font-size: 13px; color: #8998ad; }
.hero-links a:hover { color: #fff; }

.code-card { border: 1px solid var(--border); background: linear-gradient(160deg, rgba(17,26,45,.95), rgba(7,11,20,.78)); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); transform: rotate(1.2deg); }
.code-card-top { height: 51px; display: flex; align-items: center; gap: 7px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.code-card-top span { width: 9px; height: 9px; border-radius: 50%; background: #64748b; }
.code-card-top span:nth-child(1) { background: #ef6b67; }.code-card-top span:nth-child(2) { background: #eab348; }.code-card-top span:nth-child(3) { background: #59bd7b; }
.code-card-top small { margin-left: auto; color: #64748b; }
.code-card pre { margin: 0; padding: 32px; min-height: 340px; overflow: auto; color: #d8e0ee; font-size: 14px; line-height: 1.9; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.code-purple { color: #d78cff; }.code-blue { color: #70b7ff; }.code-green { color: #b8df83; }

.section-heading { max-width: 720px; margin-bottom: 44px; }
.section-heading h2, .contact-card h2 { font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -.045em; margin: 0 0 18px; }
.section-heading > p:last-child, .contact-card p { color: var(--muted); font-size: 17px; margin: 0; }
.what-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card, .timeline-card, .project-card, .stack-group { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); }
.feature-card { padding: 25px; min-height: 224px; }
.feature-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; background: rgba(39,85,238,.18); border: 1px solid rgba(77,141,255,.33); color: #78b2ff; font-family: monospace; font-weight: 800; font-size: 13px; }
.feature-card h3 { margin: 21px 0 9px; font-size: 18px; }
.feature-card p { color: var(--muted); margin: 0; font-size: 14px; }

.timeline { display: grid; gap: 18px; }
.timeline-item { display: grid; grid-template-columns: 150px 1fr; gap: 24px; }
.timeline-meta { padding-top: 27px; color: #72829a; font-size: 13px; font-weight: 750; }
.timeline-card { padding: 25px 28px; }
.timeline-card h3 { margin: 0 0 8px; font-size: 20px; }
.timeline-card h3 span { color: #8da0b9; font-weight: 550; }
.timeline-card p { color: var(--muted); margin: 0 0 17px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 6px 10px; border-radius: 999px; background: rgba(56,78,117,.22); border: 1px solid rgba(125,151,194,.14); color: #adbbcf; font-size: 12px; }
.tags.large span { font-size: 13px; padding: 8px 11px; }

.stack-layout { display: grid; grid-template-columns: .78fr 1.22fr; gap: 90px; align-items: start; }
.stack-layout .section-heading { position: sticky; top: 115px; }
.stack-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stack-group { padding: 25px; min-height: 180px; }
.stack-group h3 { margin: 0 0 18px; }

.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.project-card { padding: 30px; min-height: 310px; display: flex; flex-direction: column; }
.project-card-muted { background: rgba(15,23,42,.38); }
.project-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: auto; }
.project-top > a { font-size: 25px; color: #93a7c2; }
.project-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 12px; color: #78adff; background: rgba(39,85,238,.16); border: 1px solid rgba(77,141,255,.24); font-family: monospace; font-weight: 800; }
.project-type { color: var(--blue); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 28px 0 5px; }
.project-card h3 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.025em; }
.project-card > p:not(.project-type) { color: var(--muted); margin: 0 0 19px; }
.text-link { color: #91b9ff; font-size: 14px; font-weight: 700; margin-top: auto; }

.contact-section { padding-top: 70px; }
.contact-card { border: 1px solid rgba(77,141,255,.25); background: linear-gradient(135deg, rgba(18,31,60,.86), rgba(10,16,32,.78)); padding: 47px; border-radius: 26px; display: grid; grid-template-columns: .9fr 1.1fr; align-items: start; gap: 60px; box-shadow: var(--shadow); }
.contact-copy { max-width: 520px; }
.contact-direct { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 26px; }
.contact-direct a { color: #91b9ff; font-size: 14px; font-weight: 700; }
.contact-direct a:hover { color: #c7dcff; }
.contact-form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 8px; }
.form-row label { font-size: 13px; font-weight: 750; color: #c9d5e7; }
.form-row input, .form-row textarea { width: 100%; border: 1px solid rgba(115,143,184,.25); background: rgba(4,9,18,.56); color: #edf4ff; border-radius: 11px; padding: 13px 14px; font: inherit; outline: none; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.form-row input { min-height: 48px; }
.form-row textarea { resize: vertical; min-height: 145px; }
.form-row input::placeholder, .form-row textarea::placeholder { color: #66758a; }
.form-row input:focus, .form-row textarea:focus { border-color: rgba(77,141,255,.8); background: rgba(4,9,18,.76); box-shadow: 0 0 0 3px rgba(77,141,255,.12); }
.form-submit { justify-self: start; min-width: 160px; cursor: pointer; }
.form-submit:disabled { cursor: wait; opacity: .68; transform: none; }
.form-status { min-height: 22px; margin: -5px 0 0; font-size: 13px; font-weight: 650; color: var(--muted); }
.form-status.success { color: #76d7a5; }
.form-status.error { color: #ff8e9c; }
.form-honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.site-footer { border-top: 1px solid var(--border); color: #6f7f95; font-size: 13px; }
.footer-inner { min-height: 94px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .button { transition: none; }
}

@media (max-width: 960px) {
  .hero { min-height: auto; }
  .hero-grid, .stack-layout { grid-template-columns: 1fr; gap: 54px; }
  .code-card { transform: none; max-width: 700px; }
  .what-grid { grid-template-columns: 1fr 1fr; }
  .stack-layout .section-heading { position: static; }
  .contact-card { grid-template-columns: 1fr; gap: 38px; }
  .contact-copy { max-width: 680px; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 28px, 1160px); }
  .section { padding: 84px 0; }
  .site-header { background: rgba(7,11,20,.92); }
  .menu-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 68px; left: 14px; right: 14px; padding: 17px; flex-direction: column; align-items: stretch; gap: 5px; background: #0c1323; border: 1px solid var(--border); border-radius: 15px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 12px; }
  .nav-cta { text-align: center; margin-top: 4px; }
  .hero { padding-top: 78px; }
  .hero h1 { font-size: clamp(48px, 16vw, 72px); }
  .hero-description { font-size: 16px; }
  .code-card pre { min-height: 0; padding: 22px; font-size: 12px; }
  .what-grid, .stack-groups, .projects-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .timeline-meta { padding-top: 0; }
  .contact-card { padding: 30px 24px; gap: 32px; }
  .form-submit, .hero-actions .button { width: 100%; }
  .hero-actions .button { flex: 1; }
  .footer-inner { padding: 27px 0; min-height: 0; flex-direction: column; align-items: flex-start; }
}

/* Bilingual controls */
.language-switch { display: inline-flex; align-items: center; gap: 8px; margin-left: -9px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 10px; color: #59677b; }
.lang-button { appearance: none; border: 0; background: transparent; color: #93a0b3; font: inherit; font-weight: 800; font-size: 12px; cursor: pointer; padding: 3px 5px; border-radius: 6px; }
.lang-button:hover, .lang-button.active { color: #76aaff; background: rgba(77,141,255,.09); }


@media (max-width: 760px) {
  .language-switch { margin: 7px 10px 3px; width: max-content; }
}
