/* ============================================================
   ARB · Kutup Fatihi — Ali Rıza Bilal
   Modern polar-explorer brand site
   ============================================================ */

:root {
  --bg:        #070a0f;
  --bg-2:      #0c111a;
  --bg-3:      #10182485;
  --surface:   #121a26;
  --line:      #23303f;
  --text:      #eef4fb;
  --muted:     #9fb2c6;
  --ice:       #4da3ff;
  --ice-2:     #8fd0ff;
  --ice-deep:  #1e6fd6;
  --red:       #e2352d;
  --white:     #ffffff;
  --radius:    18px;
  --radius-sm: 12px;
  --maxw:      1180px;
  --ease:      cubic-bezier(.22,.61,.36,1);
  --shadow:    0 30px 80px -30px rgba(0,0,0,.75);
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); }
h3 { font-size: 1.4rem; }

.section { padding: clamp(64px, 10vw, 130px) 0; }
.section-dark { padding: clamp(64px, 10vw, 130px) 0; background: var(--bg-2); border-block: 1px solid var(--line); }

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .74rem;
  font-weight: 700;
  color: var(--ice);
  margin-bottom: 14px;
}
.center { text-align: center; }
.center.eyebrow, .eyebrow.center { display: block; }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 720px; margin: 18px auto 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: 14px 28px; border-radius: 999px; cursor: pointer; border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--ice) 0%, var(--ice-deep) 100%);
  color: #fff; box-shadow: 0 10px 30px -8px rgba(30,111,214,.6);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -10px rgba(30,111,214,.7); }
.btn-ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.22); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.14); transform: translateY(-3px); }

.link-arrow { color: var(--ice); font-weight: 600; font-family: var(--font-head); display: inline-block; margin-top: 8px; transition: gap .2s; }
.link-arrow:hover { color: var(--ice-2); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
/* Dark scrim so nav stays readable over bright hero imagery */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(4,7,12,.72) 0%, rgba(4,7,12,.3) 55%, transparent 100%);
  transition: opacity .35s var(--ease);
}
.site-header.scrolled::before { opacity: 0; }
.site-header.scrolled {
  background: rgba(7,10,15,.78);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }

.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand-mark { color: var(--ice-2); display: grid; place-items: center; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-head); font-size: 1.15rem; letter-spacing: .05em; }
.brand-text em { font-style: normal; font-size: .68rem; letter-spacing: .28em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.brand { text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.site-header.scrolled .brand { text-shadow: none; }
.site-header.scrolled .brand-text em { color: var(--muted); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a { font-size: .95rem; color: rgba(255,255,255,.86); padding: 9px 15px; border-radius: 999px; transition: color .2s, background .2s; font-weight: 500; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.nav a:hover { color: #fff; }
.site-header.scrolled .nav a { text-shadow: none; color: var(--muted); }
.site-header.scrolled .nav a:hover { color: #fff; }
.nav a.nav-cta { background: rgba(255,255,255,.08); color: #fff; border: 1px solid var(--line); }
.nav a.nav-cta:hover { background: var(--ice); border-color: var(--ice); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s var(--ease), opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
/* Fallback icy poster when photo is missing */
.hero-media {
  background:
    radial-gradient(120% 80% at 70% 10%, rgba(143,208,255,.35), transparent 55%),
    radial-gradient(90% 70% at 20% 90%, rgba(30,111,214,.35), transparent 60%),
    linear-gradient(180deg, #9fc9f0 0%, #6fa6d8 40%, #2b4a6e 100%);
}
.hero-img.is-missing { display: none; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,10,15,.35) 0%, rgba(7,10,15,.15) 35%, rgba(7,10,15,.72) 78%, rgba(7,10,15,.96) 100%),
    linear-gradient(90deg, rgba(7,10,15,.55) 0%, transparent 55%);
}
.hero-content { position: relative; z-index: 2; padding-bottom: clamp(64px, 12vh, 130px); padding-top: 120px; max-width: 820px; }
.hero-eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; color: var(--ice-2);
  padding: 8px 16px; border: 1px solid rgba(143,208,255,.4); border-radius: 999px;
  background: rgba(143,208,255,.08); margin-bottom: 22px;
}
.hero-title { font-size: clamp(2.6rem, 8vw, 5.4rem); font-weight: 800; letter-spacing: -.03em; }
.hero-title .accent {
  background: linear-gradient(120deg, var(--ice-2), var(--ice) 55%, var(--white));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); color: #d7e3f0; max-width: 620px; margin-top: 22px; }
.hero-sub b { color: #fff; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.hero-motto { margin-top: 30px; font-family: var(--font-head); font-style: italic; color: var(--ice-2); font-size: 1.05rem; opacity: .92; }

.hero-scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.5); border-radius: 999px; }
.hero-scroll span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; background: #fff; border-radius: 2px; transform: translateX(-50%); animation: scrolldot 1.7s var(--ease) infinite; }
@keyframes scrolldot { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 22px; } 100% { opacity: 0; } }

/* ============================================================
   STATS
   ============================================================ */
.stats { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); padding: clamp(48px,7vw,84px) 0; border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.stat { text-align: center; padding: 12px; border-radius: var(--radius-sm); }
.stat-num { display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.03em;
  background: linear-gradient(120deg, #fff, var(--ice-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { display: block; margin-top: 6px; color: var(--muted); font-size: .9rem; }

/* ============================================================
   STORY
   ============================================================ */
.story-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(30px, 6vw, 74px); align-items: center; }
.portrait-frame { position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-fallback { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(circle at 50% 30%, #1c2a3c, #0b121c); color: var(--ice-2); }
.portrait-fallback span { font-family: var(--font-head); font-weight: 800; font-size: 3.5rem; letter-spacing: .08em; }
.portrait-fallback small { color: var(--muted); letter-spacing: .2em; text-transform: uppercase; font-size: .75rem; }
.portrait-frame.is-missing img { display: none; }
.portrait-frame.is-missing .portrait-fallback { display: flex; }
.story-text p { color: var(--muted); margin-top: 16px; }
.story-text p b { color: var(--text); }
.story-text h2 { margin-top: 4px; }

/* ============================================================
   TIMELINE
   ============================================================ */
.tl { list-style: none; max-width: 760px; margin: 46px auto 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 96px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--ice), transparent); }
.tl li { display: grid; grid-template-columns: 96px 1fr; gap: 26px; padding: 12px 0; position: relative; align-items: baseline; }
.tl-year { font-family: var(--font-head); font-weight: 700; color: var(--ice-2); font-size: .95rem; text-align: right; }
.tl-body { color: var(--muted); position: relative; padding-left: 26px; }
.tl-body::before { content: ""; position: absolute; left: -6px; top: .55em; width: 11px; height: 11px; border-radius: 50%; background: var(--bg-2); border: 2px solid var(--ice); transform: translateX(-50%); }
.tl li.highlight .tl-body { color: #fff; font-weight: 600; }
.tl li.highlight .tl-body::before { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 5px rgba(226,53,45,.2); }

/* ============================================================
   CARDS
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; overflow: hidden; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(143,208,255,.4), transparent 40%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s; }
.card:hover { transform: translateY(-6px); border-color: transparent; box-shadow: var(--shadow); }
.card:hover::after { opacity: 1; }
.card.featured { background: linear-gradient(180deg, #13233a, var(--surface)); border-color: rgba(77,163,255,.35); }
.card-badge { display: inline-block; font-family: var(--font-head); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.card-badge.done { background: rgba(77,163,255,.14); color: var(--ice-2); }
.card-badge.next { background: rgba(226,53,45,.16); color: #ff8a84; }
.card-badge.new  { background: rgba(255,255,255,.08); color: var(--muted); }
.card h3 { margin-bottom: 6px; }
.card-meta { color: var(--ice); font-size: .85rem; font-weight: 600; margin-bottom: 12px; font-family: var(--font-head); }
.card p { color: var(--muted); font-size: .96rem; }
.card-link { display: inline-block; margin-top: 16px; color: var(--ice-2); font-family: var(--font-head); font-weight: 600; font-size: .92rem; }

/* ============================================================
   BOOK
   ============================================================ */
.book-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 8vw, 90px); align-items: center; }
.book-cover { display: flex; justify-content: center; perspective: 1200px; }
.book-3d {
  width: min(280px, 70vw); aspect-ratio: 3/4.3; border-radius: 6px 12px 12px 6px;
  background: linear-gradient(135deg, #0c1826 0%, #16324f 55%, #1e6fd6 140%);
  border-left: 8px solid rgba(0,0,0,.4);
  box-shadow: 24px 34px 70px -22px rgba(0,0,0,.8), inset 0 0 60px rgba(143,208,255,.08);
  transform: rotateY(-22deg) rotateX(4deg); transform-style: preserve-3d;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 30px 26px;
  transition: transform .5s var(--ease);
}
.book-cover:hover .book-3d { transform: rotateY(-12deg) rotateX(2deg); }
.book-title { font-family: var(--font-head); font-weight: 800; font-size: 1.9rem; color: #fff; line-height: 1.05; }
.book-sub { color: var(--ice-2); font-size: .82rem; letter-spacing: .04em; }
.book-text p { color: var(--muted); margin: 18px 0 26px; }

/* ============================================================
   SPEAK
   ============================================================ */
.speak-topics { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin: 44px 0; }
.topic { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; transition: transform .3s var(--ease), border-color .3s; }
.topic:hover { transform: translateY(-5px); border-color: rgba(77,163,255,.4); }
.topic h4 { font-family: var(--font-head); font-size: 1.15rem; color: #fff; margin-bottom: 8px; }
.topic p { color: var(--muted); font-size: .95rem; }

/* ============================================================
   SUPPORT
   ============================================================ */
.support-inner { text-align: center; max-width: 720px; margin: 0 auto; }
.support-inner p { color: var(--muted); margin: 16px 0 28px; font-size: 1.08rem; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 70px); }
.contact-info p { color: var(--muted); margin-top: 14px; }
.contact-list { list-style: none; margin-top: 30px; display: grid; gap: 18px; }
.contact-list li { display: flex; flex-direction: column; gap: 3px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.contact-list span { font-size: .74rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); font-family: var(--font-head); }
.contact-list a { color: var(--ice-2); font-size: 1.05rem; }
.contact-list a:hover { color: #fff; }

.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: grid; gap: 16px; }
.contact-form label { display: grid; gap: 7px; font-size: .84rem; color: var(--muted); font-family: var(--font-head); font-weight: 600; }
.contact-form label span { color: var(--red); }
.contact-form input, .contact-form textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 15px; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--ice); box-shadow: 0 0 0 3px rgba(77,163,255,.18); }
.contact-form .btn { margin-top: 6px; }

/* ============================================================
   BLOG
   ============================================================ */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 44px; }
.sec-head .eyebrow { margin-bottom: 8px; }
.sec-head h2 { margin: 0; }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.posts-empty { color: var(--muted); grid-column: 1 / -1; }

.post-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.post-card:hover { transform: translateY(-6px); border-color: rgba(77,163,255,.4); box-shadow: var(--shadow); }
.post-card-media { aspect-ratio: 16/10; overflow: hidden; background: #0d1622; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post-card:hover .post-card-media img { transform: scale(1.06); }
.post-card-media.no-img { display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #1c2a3c, #0b121c); }
.post-card-media.no-img span { font-family: var(--font-head); font-weight: 800; font-size: 2rem; color: var(--ice); letter-spacing: .1em; opacity: .5; }
.post-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-date { font-family: var(--font-head); font-size: .78rem; letter-spacing: .04em; color: var(--ice); font-weight: 600; }
.post-card-body h3 { margin: 8px 0 10px; font-size: 1.25rem; color: #fff; }
.post-card-body p { color: var(--muted); font-size: .95rem; flex: 1; }
.post-card-body .card-link { margin-top: 16px; color: var(--ice-2); font-family: var(--font-head); font-weight: 600; font-size: .9rem; }

/* ---- Subpages (blog list / single post) ---- */
.subpage { background: var(--bg); }
.subpage-main { padding-top: 74px; min-height: 70vh; }
.subpage-head { padding: clamp(46px, 8vw, 84px) 0 40px; }
.subpage-head h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 6px 0 14px; }

.post-article { max-width: 760px; padding-top: clamp(40px, 7vw, 72px); padding-bottom: clamp(48px, 9vw, 96px); }
.post-back { margin-bottom: 20px; }
.post-back a { color: var(--ice-2); font-family: var(--font-head); font-weight: 600; font-size: .92rem; }
.post-article h1 { font-size: clamp(2rem, 5.5vw, 3.1rem); margin: 8px 0 22px; }
.post-hero { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); margin: 10px 0 30px; }
.post-content { color: #cdd9e6; font-size: 1.08rem; line-height: 1.8; }
.post-content > *:first-child { margin-top: 0; }
.post-content h2 { font-size: 1.6rem; color: #fff; margin: 38px 0 14px; }
.post-content h3 { font-size: 1.3rem; color: #fff; margin: 30px 0 12px; }
.post-content p { margin: 0 0 20px; }
.post-content a { color: var(--ice-2); text-decoration: underline; text-underline-offset: 3px; }
.post-content ul, .post-content ol { margin: 0 0 20px; padding-left: 24px; }
.post-content li { margin-bottom: 8px; }
.post-content img { width: 100%; border-radius: var(--radius-sm); margin: 24px 0; border: 1px solid var(--line); }
.post-content blockquote { margin: 24px 0; padding: 6px 22px; border-left: 3px solid var(--ice); color: var(--muted); font-style: italic; }
.post-content strong { color: #fff; }
.post-content code { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: .9em; }

@media (max-width: 940px) { .posts-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .posts-grid { grid-template-columns: 1fr; } .sec-head { flex-direction: column; align-items: flex-start; gap: 10px; } }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { display: flex; flex-direction: column; }
.footer-brand strong { font-family: var(--font-head); }
.footer-brand span { color: var(--muted); font-size: .88rem; }
.footer-nav { display: flex; gap: 22px; }
.footer-nav a { color: var(--muted); font-size: .92rem; }
.footer-nav a:hover { color: #fff; }
.footer-copy { color: var(--muted); font-size: .82rem; width: 100%; text-align: center; padding-top: 18px; border-top: 1px solid var(--line); }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 26px 14px; }
  .stats-grid .stat:last-child { grid-column: 1 / -1; }
  .story-grid { grid-template-columns: 1fr; }
  .story-portrait { max-width: 360px; margin: 0 auto; }
  .cards, .speak-topics { grid-template-columns: 1fr; }
  .book-grid, .contact-grid { grid-template-columns: 1fr; }
  .book-cover { order: -1; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; z-index: 120; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; align-items: stretch; justify-content: center; gap: 6px;
    background: rgba(9,13,20,.97); backdrop-filter: blur(16px); padding: 40px 30px;
    transform: translateX(105%); transition: transform .4s var(--ease); border-left: 1px solid var(--line);
  }
  .nav.open { transform: none; }
  .nav a { font-size: 1.1rem; padding: 14px 16px; }
  .nav a.nav-cta { text-align: center; margin-top: 10px; }
  .hero-content { padding-top: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
