
:root {
  color-scheme: light;
  --paper: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #eef1f6;
  --ink: #12141c;
  --mist: #5b6472;
  --line: rgba(15, 23, 42, 0.1);
  --flame: #f2542d;
  --ember: #f97316;
  --orange: #c2410c;
  --gradient: linear-gradient(135deg, var(--flame) 0%, var(--ember) 55%, var(--orange) 100%);
  --glow: 0 0 0 1px var(--line), 0 2rem 4rem -2.25rem rgba(249, 115, 22, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Helvetica, Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { text-underline-offset: 0.22em; }
::selection { background: var(--flame); color: #ffffff; }

.forge-page { min-height: 100dvh; background: var(--paper); color: var(--ink); }

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 50;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0.5rem;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }
a:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 0.2rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 251, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-header nav a { min-height: 2.75rem; display: inline-flex; align-items: center; }
.brand-link img { display: block; transition: opacity 200ms ease, transform 200ms ease; }
.brand-link:hover img, .brand-link:focus-visible img { transform: translateY(-1px); }
.nav-link, .brand-link, .project-link, .back-link { transition: color 180ms ease, transform 180ms ease; }
.nav-link:hover, .nav-link:focus-visible, .brand-link:hover, .brand-link:focus-visible, .project-link:hover, .project-link:focus-visible { color: var(--orange); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}
.nav-cta:hover, .nav-cta:focus-visible { border-color: var(--orange); background: rgba(194, 65, 12, 0.08); transform: translateY(-1px); }

/* Hero */
.hero-section {
  min-height: min(44rem, calc(100dvh - 4.5rem));
  padding-top: clamp(4rem, 9vw, 7rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
}
.hero-orb { position: absolute; border-radius: 9999px; filter: blur(64px); pointer-events: none; z-index: 0; animation: kilic-drift 14s ease-in-out infinite; }
.hero-copy { position: relative; z-index: 1; animation: kilic-rise 720ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero-kicker { display: inline-flex; align-items: center; gap: 0.5rem; }
.sparkle {
  display: inline-block;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: kilic-twinkle 3200ms ease-in-out infinite;
}
.hero-cta {
  background: var(--gradient);
  padding: 1rem 1.75rem;
  border-radius: 9999px;
  box-shadow: 0 1rem 2.5rem -1rem rgba(249, 115, 22, 0.4);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease;
}
.hero-cta:hover, .hero-cta:focus-visible { transform: translateY(-3px); box-shadow: 0 1.5rem 3rem -1rem rgba(249, 115, 22, 0.48); }

.hero-visual { position: relative; z-index: 1; width: min(20rem, 72vw); aspect-ratio: 1 / 1; margin-inline: auto; animation: kilic-rise 820ms 120ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero-hex { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 1.6rem rgba(249, 115, 22, 0.18)); animation: kilic-spin 70s linear infinite; }
.hero-mark-glyph {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 42%;
  aspect-ratio: 164 / 236;
  background: var(--gradient);
  -webkit-mask-image: url(/assets/logo.svg);
  mask-image: url(/assets/logo.svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  filter: drop-shadow(0 0 2.4rem rgba(242, 84, 45, 0.32));
  animation: kilic-float 5200ms ease-in-out infinite;
}
.hero-sparkle-a { position: absolute; font-size: 1rem; animation-delay: -0.6s; }
.hero-sparkle-b { position: absolute; font-size: 0.75rem; animation-delay: -1.8s; }

/* Sections */
.section-kicker { display: inline-flex; }
.section-heading { padding-top: 2.5rem; padding-bottom: 1rem; border-top: 1px solid var(--line); }
.project-section { padding-top: clamp(4rem, 9vw, 8rem); }
.about-section { padding-top: clamp(5rem, 10vw, 9rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.contact-section { padding-top: clamp(6rem, 11vw, 10rem); padding-bottom: clamp(6rem, 11vw, 10rem); }
.contact-rule { width: 100%; height: 1px; margin-bottom: clamp(4rem, 8vw, 7rem); background: var(--line); }
.contact-cta {
  background: var(--gradient);
  padding: 1.1rem 2rem;
  border-radius: 9999px;
  box-shadow: 0 1rem 2.5rem -1rem rgba(242, 84, 45, 0.4);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease;
}
.contact-cta:hover, .contact-cta:focus-visible { transform: translateY(-3px); box-shadow: 0 1.5rem 3rem -1rem rgba(242, 84, 45, 0.48); }

/* Project spotlight */
.project-frame {
  display: block;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--glow);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 320ms ease, border-color 320ms ease;
  text-decoration: none;
}
.project-frame:hover, .project-frame:focus-visible {
  transform: perspective(1200px) rotateX(1deg) rotateY(-1.4deg) translateY(-6px);
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.3), 0 2.5rem 6rem -2rem rgba(249, 115, 22, 0.3);
}
.frame-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.85rem 1rem; background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.frame-dot { width: 0.6rem; height: 0.6rem; border-radius: 9999px; display: inline-block; }
.frame-url { margin-left: 0.5rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace; font-size: 0.75rem; color: var(--mist); }
.frame-shot { display: block; width: 100%; height: auto; }

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(194, 65, 12, 0.3);
  background: rgba(194, 65, 12, 0.08);
}
.project-status::before { content: ""; width: 0.4rem; height: 0.4rem; border-radius: 9999px; background: var(--orange); box-shadow: 0 0 0.5rem var(--orange); }
.stack-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--mist);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.75rem;
}

/* Feature grid */
.feature-card {
  padding: 1.75rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), border-color 260ms ease;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(242, 84, 45, 0.35); }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: var(--gradient);
  color: var(--ink);
  font-weight: 700;
}

/* Footer */
.site-footer { min-height: 6rem; border-top: 1px solid var(--line); }

/* Legal pages */
.legal-page { min-height: calc(100dvh - 6rem); display: flex; flex-direction: column; justify-content: space-between; }
.legal-shell { width: 100%; padding-top: clamp(4rem, 9vw, 7rem); padding-bottom: clamp(5rem, 10vw, 8rem); }
.legal-kicker { margin-top: clamp(4rem, 8vw, 7rem); }
.legal-card { margin-top: 1.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.legal-card h1 { max-width: 48rem; margin: 0 0 2rem; font-size: clamp(2.5rem, 7vw, 5rem); line-height: 0.96; letter-spacing: -0.05em; color: var(--ink); }
.legal-card h2 { margin: 2.5rem 0 0.75rem; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.025em; color: var(--ink); }
.legal-card p { max-width: 46rem; color: var(--mist); font-size: 1.05rem; line-height: 1.7; }
.legal-card a { color: var(--orange); }

/* Motion */
@keyframes kilic-rise {
  from { opacity: 0; transform: translateY(1.25rem); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes kilic-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.6rem); }
}
@keyframes kilic-drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(1.5rem, -1rem, 0); }
}
@keyframes kilic-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes kilic-twinkle {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@media (max-width: 767px) {
  .site-header { min-height: 4rem; }
  .site-header nav { gap: 0.75rem; }
  .site-header nav a:nth-child(2) { display: none; }
  .hero-copy h1 { font-size: clamp(3rem, 15vw, 4.5rem); }
  .hero-visual { margin-top: 2.5rem; width: 12rem; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 1rem; padding-top: 2rem; padding-bottom: 2rem; }
}

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