:root {
  color-scheme: dark;
  --bg: #09090B;
  --card: #111113;
  --card-hover: #141417;
  --raised: #18181B;
  --raised-hover: #27272A;
  --fg: #FAFAF9;
  --fg-2: #E4E4E7;
  --fg-3: #D4D4D8;
  --muted: #A1A1AA;
  --dim: #71717A;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.12);
  --accent: #D4FF4F;
  --accent-glow: rgba(212, 255, 79, 0.22);
  --ink: #09090B;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Geist", "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Frank Ruhl Libre", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.ltr { direction: ltr; }

.wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--accent); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(9, 9, 11, 0.7); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); }
.topbar-inner { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; padding: 8px 0; }
.brand-logo { display: block; height: 50px; width: auto; }
.brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: center; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); padding: 10px 0; transition: color .2s; }
.nav a:hover { color: var(--fg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; border: 0; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 16px; white-space: nowrap; cursor: pointer; transition: transform .35s var(--ease), background-color .3s ease, box-shadow .35s ease; }
.btn svg { transition: transform .35s var(--ease); }
.btn-lg { padding: 17px 28px; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-light { background: var(--fg); color: var(--ink); }
.btn-ghost { background: var(--raised); color: var(--fg); font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); }
.btn-pill { padding: 0 16px; font-size: 14px; font-weight: 500; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn:hover .arrow { transform: translate(3px, -3px); }
  [dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translate(3px, -3px); }
  .btn-ghost:hover { background: var(--raised-hover); }
}
.btn:active { transform: scale(.97); }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-glow { position: absolute; top: -260px; inset-inline-end: -200px; width: 900px; height: 900px; border-radius: 50%; background: radial-gradient(circle, var(--accent-glow) 0%, rgba(9, 9, 11, 0) 62%); pointer-events: none; animation: drift 18s ease-in-out infinite alternate; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px); background-size: 72px 72px; pointer-events: none; }
.hero-inner { position: relative; display: flex; flex-direction: column; gap: 40px; padding-top: 120px; padding-bottom: 72px; }
.hero-id { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.avatar { flex: none; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px rgba(255, 255, 255, 0.18); }
.avatar img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.hero-name { font-weight: 600; font-size: 50px; line-height: 1.1; letter-spacing: -0.03em; }
.hero h1 { font-weight: 600; font-size: clamp(30px, 8vw, 118px); line-height: 0.95; letter-spacing: -0.055em; max-width: 1200px; }
/* Rotating word: every word shares one grid cell; the current one is shown, the previous one leaves upward. */
.hero-words { display: inline-grid; justify-items: start; }
.hero-words > span { grid-area: 1 / 1; white-space: nowrap; opacity: 0; transform: translateY(0.7em); filter: blur(10px); transition: transform .8s cubic-bezier(.65, 0, .35, 1), opacity .8s cubic-bezier(.65, 0, .35, 1), filter .8s cubic-bezier(.65, 0, .35, 1); }
.hero-words > .is-cur { opacity: 1; transform: none; filter: none; }
.hero-words > .is-prev { transform: translateY(-0.7em); }
.hero h1 em { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--accent); }
.hero-foot { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-end; justify-content: space-between; }
.hero-sub { max-width: 560px; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.rise { animation: rise 1s var(--ease) both; }
.rise-2 { animation-delay: .12s; }
.rise-3 { animation-delay: .26s; }
.rise-4 { animation-duration: 1.2s; animation-delay: .4s; }

/* Marquee */
.marquee { padding: 48px 0 120px; }
.marquee-tilt { direction: ltr; transform: rotate(-4deg); margin: 0 -40px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 20px; width: max-content; animation: marquee 70s linear infinite; }
.marquee-tilt:hover .marquee-track { animation-play-state: paused; }
.marquee-track img { width: 560px; height: auto; aspect-ratio: 56 / 45; object-fit: cover; object-position: top; border-radius: 18px; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0, 0, 0, 0.8); }

/* About */
.about { display: flex; flex-direction: column; gap: 72px; padding-top: 40px; padding-bottom: 140px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1px; background: var(--line); border-radius: 28px; overflow: hidden; }
.stat { background: var(--bg); padding: 36px 32px; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.stat-big { font-weight: 600; font-size: clamp(44px, 5vw, 64px); line-height: 1; letter-spacing: -0.05em; }
.stat-label { color: var(--muted); font-size: 15px; line-height: 1.4; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 48px 56px; }
.about-item { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; border-top: 1px solid var(--line-2); }
.about-n { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.about-item h2 { font-weight: 600; font-size: 24px; line-height: 1.2; letter-spacing: -0.03em; }
.about-item p { color: var(--muted); font-size: 16px; line-height: 1.7; }

/* Projects */
.projects { display: flex; flex-direction: column; gap: 56px; padding-bottom: 140px; }
.section-head { display: flex; flex-wrap: wrap; gap: 16px 48px; align-items: flex-end; justify-content: space-between; }
.section-head h2 { font-weight: 600; font-size: clamp(48px, 7.4vw, 112px); line-height: 0.92; letter-spacing: -0.055em; }
.section-head h2 .dot { color: var(--accent); }
.section-head p { max-width: 420px; color: var(--muted); font-size: 18px; }
.project-list { display: flex; flex-direction: column; gap: 20px; }

.project { display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: center; padding: 28px; border-radius: 36px; background: var(--card); transition: box-shadow .6s ease, background-color .6s ease; }
.project:nth-child(even) { flex-direction: row-reverse; }
.project-visual { flex: 999 1 520px; min-width: 0; margin: 0; border-radius: 22px; overflow: hidden; background: var(--raised); }
.project-visual img { width: 100%; height: auto; aspect-ratio: 10 / 7; object-fit: cover; object-position: top; transition: transform 1s var(--ease); }
@media (hover: hover) {
  .project:hover { background: var(--card-hover); box-shadow: 0 0 0 1px rgba(255, 255, 255, .10), 0 60px 120px -60px var(--accent-glow); }
  .project:hover .project-visual img { transform: scale(1.04) rotate(-.6deg); }
}
.project-info { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.num { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.kicker { font-size: 12px; font-weight: 600; line-height: 1.4; padding: 5px 12px; border-radius: 999px; background: var(--accent); color: var(--ink); }
.status { font-size: 13px; color: var(--muted); }
.project h3 { margin-top: 4px; font-weight: 600; font-size: clamp(32px, 3.2vw, 44px); line-height: 1; letter-spacing: -0.045em; }
.tagline { font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.25; color: var(--fg-2); }
.desc { color: var(--muted); font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; direction: ltr; }
[dir="rtl"] .chips { justify-content: flex-end; }
.chips li { font-family: var(--mono); font-size: 12px; line-height: 1.4; padding: 5px 10px; border-radius: 999px; background: var(--raised); color: var(--fg-3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }

.behind { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s var(--ease), opacity .3s ease; }
.behind.open { grid-template-rows: 1fr; opacity: 1; }
.behind-inner { min-height: 0; overflow: hidden; }
.behind ul { margin: 6px 0 0; padding: 20px; padding-inline-start: 38px; border-radius: 20px; background: var(--raised); display: flex; flex-direction: column; gap: 8px; color: var(--fg-3); font-size: 15px; line-height: 1.55; }
.behind li::marker { color: var(--accent); }

.project-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.project-actions .btn-light { padding: 12px 22px; font-size: 15px; }
.behind-toggle { padding: 0 18px; font-size: 14px; }
.behind-toggle .chev { transition: transform .35s var(--ease); }
.behind-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.label-short { display: none; }

/* More */
.more { display: flex; flex-direction: column; gap: 20px; margin-top: 40px; }
.more-title { font-weight: 600; font-size: 28px; letter-spacing: -0.035em; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.more-card { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: 28px; background: var(--card); text-decoration: none; transition: box-shadow .6s ease, background-color .6s ease; }
@media (hover: hover) {
  .more-card:hover { background: var(--card-hover); box-shadow: 0 0 0 1px rgba(255, 255, 255, .10), 0 60px 120px -60px var(--accent-glow); }
  a.more-card:hover h4 .arrow { transform: translate(3px, -3px); }
  [dir="rtl"] a.more-card:hover h4 .arrow { transform: scaleX(-1) translate(3px, -3px); }
}
.more-tag { align-self: flex-start; direction: ltr; font-family: var(--mono); font-size: 12px; line-height: 1.4; padding: 4px 10px; border-radius: 999px; background: var(--raised); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.more-card h4 { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 22px; line-height: 1.15; letter-spacing: -0.03em; }
.more-card h4 .arrow { color: var(--accent); transition: transform .35s var(--ease); }
.more-card p { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* Contact */
.contact { padding: 0 24px 24px; }
.contact-card { position: relative; max-width: 1240px; margin: 0 auto; border-radius: 44px; background: var(--accent); color: var(--ink); padding: clamp(40px, 7vw, 104px); display: flex; flex-direction: column; gap: 40px; overflow: hidden; }
.contact-dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(9, 9, 11, 0.12) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.contact-card h2 { position: relative; font-weight: 600; font-size: clamp(56px, 10vw, 160px); line-height: 0.88; letter-spacing: -0.06em; max-width: 1000px; }
.contact-foot { position: relative; display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-end; justify-content: space-between; }
.contact-foot p { max-width: 560px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: #27272A; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-ink { padding: 18px 26px; background: var(--ink); color: var(--fg); }
.btn-outline { padding: 18px 26px; background: rgba(9, 9, 11, 0.08); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(9, 9, 11, 0.5); }
@media (hover: hover) { .btn-outline:hover { background: rgba(9, 9, 11, 0.14); } }
.badge { font-size: 12px; font-weight: 600; line-height: 1.4; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: var(--ink); }

.footer { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: center; padding-top: 28px; padding-bottom: 40px; font-size: 14px; color: var(--muted); }

@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8%, 6%) scale(1.15); } 100% { transform: translate(-6%, 10%) scale(.95); } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Phone layout */
@media (max-width: 640px) {
  body { font-size: 16px; line-height: 1.6; }
  .wrap { padding: 0 20px; }
  .topbar .wrap { padding: 0 16px; }
  .topbar-inner { flex-wrap: nowrap; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .brand { min-height: 44px; padding: 0; }
  .brand-logo { height: 42px; }
  .nav { flex-wrap: nowrap; gap: 6px; font-size: 14px; }
  .nav a { padding: 12px 8px; }
  .btn-pill { padding: 0 14px; font-size: 13px; gap: 6px; }

  .hero-glow { top: -180px; inset-inline-end: -220px; width: 560px; height: 560px; }
  .hero-grid { background-size: 48px 48px; }
  .hero-inner { gap: 28px; padding-top: 56px; padding-bottom: 24px; }
  .hero-id { flex-wrap: nowrap; gap: 14px; }
  .avatar { width: 64px; height: 64px; }
  .hero-name { font-size: 30px; letter-spacing: -0.035em; }
  .hero h1 { font-size: 32px; line-height: 1; }
  .hero-foot { flex-direction: column; align-items: stretch; gap: 28px; }
  .hero-sub { font-size: 18px; }
  .cta-row { flex-direction: column; gap: 10px; }
  .cta-row .btn { padding: 16px 24px; }

  .marquee { padding: 40px 0 72px; }
  .marquee-tilt { transform: rotate(-5deg); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
  .marquee-track { gap: 14px; animation-duration: 50s; }
  .marquee-track img { width: 300px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 24px 48px -24px rgba(0, 0, 0, 0.8); }

  .about { gap: 48px; padding-top: 16px; padding-bottom: 88px; }
  .stats { grid-template-columns: 1fr; border-radius: 24px; }
  .stat { padding: 26px 24px; align-items: flex-start; text-align: start; }
  .stat-big { font-size: 44px; }
  .about-grid { gap: 36px; }
  .about-item { gap: 12px; padding-top: 20px; }
  .about-item h2 { font-size: 22px; }

  .projects { gap: 32px; padding: 0 12px 88px; }
  .section-head { flex-direction: column; align-items: stretch; gap: 14px; padding: 0 8px; }
  .section-head h2 { font-size: 60px; }
  .section-head p { font-size: 17px; }
  .project-list { gap: 14px; }
  .project, .project:nth-child(even) { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 20px; padding: 12px 12px 24px; border-radius: 28px; }
  .project-visual { flex: none; border-radius: 18px; }
  .project-info { flex: none; gap: 12px; padding: 0 8px; }
  .meta { gap: 8px 12px; }
  .project h3 { font-size: 32px; line-height: 1.02; }
  .tagline { font-size: 22px; }
  .desc { font-size: 15px; }
  .chips { margin-top: 2px; }
  .chips li { padding: 4px 9px; }
  .behind ul { margin-top: 4px; padding: 16px; padding-inline-start: 32px; border-radius: 18px; font-size: 14px; }
  .project-actions { flex-wrap: nowrap; gap: 8px; margin-top: 8px; }
  .project-actions .btn { flex: 1 1 0; min-height: 48px; padding: 0 14px; }
  .behind-toggle { gap: 6px; }
  .label-full { display: none; }
  .label-short { display: inline; }

  .more { gap: 14px; margin-top: 24px; }
  .more-title { padding: 0 8px; font-size: 24px; }
  .more-grid { gap: 14px; }
  .more-card { gap: 8px; padding: 22px 20px; border-radius: 24px; }
  .more-tag { font-size: 11px; padding: 4px 9px; }
  .more-card h4 { margin-top: 6px; font-size: 20px; }

  .contact { padding: 0 12px 12px; }
  .contact-card { border-radius: 32px; padding: 40px 24px 28px; gap: 24px; }
  .contact-dots { background-size: 18px 18px; }
  .contact-card h2 { font-size: clamp(48px, 15vw, 60px); line-height: 0.9; }
  .contact-foot { flex-direction: column; align-items: stretch; gap: 24px; }
  .contact-foot p { font-size: 16px; }
  .contact-links { flex-direction: column; gap: 10px; margin-top: 4px; }
  .contact-links .btn { padding: 17px 20px; font-size: 15px; white-space: normal; }
  .badge { font-size: 11px; padding: 3px 8px; }

  .footer { flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 24px; padding-bottom: 36px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-glow, .rise, .marquee-track { animation: none; }
  .hero-words > span { transition: none; }
  .btn, .btn svg, .project, .project-visual img, .behind, .behind-toggle .chev, .more-card { transition: none; }
}
