/* ==========================================================================
   Oğuz Kaan — Portfolio v2
   Tokens, components & motion helpers. Layout utilities come from Tailwind.
   ========================================================================== */

:root {
  --bg: #09090b;
  --bg-2: #111114;
  --bg-3: #18181c;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --fg: #f2f2f0;
  --muted: #8b8b94;
  --dim: #55555d;
  --accent: #c8f542;
  --accent-rgb: 200, 245, 66;
  --accent-ink: #0b0d02;
  --radius: 22px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: dark;
}

html { background: var(--bg); -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { background: var(--bg); color: var(--fg); overflow-x: clip; }
html.is-loading body { overflow: hidden; }
::selection { background: var(--accent); color: var(--accent-ink); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #26262b; border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

[dir="rtl"] body { font-family: "IBM Plex Sans Arabic", Geist, system-ui, sans-serif; }

.container-x {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}

.section { padding-block: clamp(80px, 10vw, 150px); position: relative; }

/* --------------------------------------------------------------------------
   Grain + progress
   -------------------------------------------------------------------------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes grain {
  0%, 100% { background-position: 0 0; }
  20% { background-position: -60px 40px; }
  40% { background-position: 40px -70px; }
  60% { background-position: -30px -20px; }
  80% { background-position: 55px 50px; }
}

.scroll-progress { position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 160; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
[dir="rtl"] .scroll-progress span { transform-origin: right; }

/* --------------------------------------------------------------------------
   Cursor
   -------------------------------------------------------------------------- */
.cursor { display: none; }
html.has-cursor .cursor { display: block; }
html.has-cursor, html.has-cursor body, html.has-cursor a, html.has-cursor button, html.has-cursor summary { cursor: none; }
html.has-cursor input, html.has-cursor textarea { cursor: text; }

.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 400; pointer-events: none; border-radius: 50%;
}
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--accent); }
.cursor-ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid; place-items: center;
  transition: width .45s var(--ease-out), height .45s var(--ease-out), margin .45s var(--ease-out),
              background-color .3s, border-color .3s, opacity .3s;
}
.cursor-label {
  font: 500 11px/1 "Geist Mono", monospace; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent-ink); opacity: 0; transform: scale(.6); transition: opacity .25s, transform .35s var(--ease-out);
}
.cursor.is-hover .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--accent); background: rgba(var(--accent-rgb), .08); }
.cursor.is-hover .cursor-dot { opacity: 0; }
.cursor.is-label .cursor-ring { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--accent); border-color: var(--accent); }
.cursor.is-label .cursor-label { opacity: 1; transform: scale(1); }
.cursor.is-label .cursor-dot { opacity: 0; }
.cursor.is-text .cursor-ring { opacity: 0; }
.cursor.is-hidden .cursor-ring, .cursor.is-hidden .cursor-dot { opacity: 0; }

/* --------------------------------------------------------------------------
   Preloader
   -------------------------------------------------------------------------- */
#preloader {
  position: fixed; inset: 0; z-index: 500;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(20px, 4vw, 48px);
}
html.no-js #preloader { display: none; }
.pl-num { font-size: clamp(6rem, 22vw, 18rem); line-height: .8; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.pl-bar { height: 1px; background: var(--line-2); margin-top: 24px; overflow: hidden; }
.pl-bar span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
#nav { position: fixed; top: 0; inset-inline: 0; z-index: 120; transition: transform .6s var(--ease-out); }
#nav.is-hidden { transform: translateY(-130%); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: calc(100% - 24px); max-width: 1360px; margin: 12px auto 0;
  padding: 10px 10px 10px clamp(12px, 2vw, 22px);
  border-radius: 999px; border: 1px solid transparent;
  transition: max-width .7s var(--ease-out), background-color .5s, border-color .5s;
}
[dir="rtl"] .nav-inner { padding: 10px clamp(12px, 2vw, 22px) 10px 10px; }
#nav.is-scrolled .nav-inner {
  max-width: 1080px;
  background: rgba(17, 17, 20, .72);
  border-color: var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.logo-mark {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink);
  font: 700 14px/1 "Bricolage Grotesque", sans-serif; letter-spacing: -.04em;
  transition: transform .6s var(--ease-out), border-radius .6s var(--ease-out);
}
.logo:hover .logo-mark { transform: rotate(-90deg); border-radius: 50%; }

.nav-link { position: relative; padding: 8px 14px; color: var(--muted); border-radius: 999px; transition: color .3s; }
.nav-link:hover, .nav-link.is-active { color: var(--fg); }
.nav-link::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .4s var(--ease-out);
}
.nav-link.is-active::after { transform: scale(1); }

/* Roll text (hover label swap) */
.roll { display: inline-block; position: relative; overflow: hidden; height: 1.25em; line-height: 1.25em; vertical-align: middle; }
.roll > span { display: block; transition: transform .55s var(--ease-out); }
.roll > span::after { content: attr(data-text); display: block; }
a:hover .roll > span, button:hover .roll > span { transform: translateY(-50%); }

/* Language dropdown */
.lang { position: relative; }
.lang summary { list-style: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang-btn {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--fg); transition: border-color .3s, background-color .3s; user-select: none;
}
.lang-btn:hover, .lang[open] .lang-btn { border-color: var(--line-2); background: rgba(255, 255, 255, .04); }
.lang-chev { transition: transform .3s var(--ease-out); }
.lang[open] .lang-chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 180px; padding: 6px;
  background: rgba(17, 17, 20, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
  animation: pop .35s var(--ease-out);
}
.lang-menu a {
  display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px;
  font-size: 14px; color: var(--muted); transition: background-color .2s, color .2s;
}
.lang-menu a:hover { background: rgba(255, 255, 255, .05); color: var(--fg); }
.lang-menu a.is-active { color: var(--accent); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }

/* Mobile menu */
.menu-toggle {
  width: 44px; height: 44px; border-radius: 50%; background: var(--fg); position: relative;
  display: grid; place-items: center;
}
.menu-toggle span {
  position: absolute; width: 16px; height: 1.5px; background: var(--bg); border-radius: 2px;
  transition: transform .5s var(--ease-out);
}
.menu-toggle span:first-child { transform: translateY(-3px); }
.menu-toggle span:last-child { transform: translateY(3px); }
.menu-open .menu-toggle span:first-child { transform: rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: rotate(-45deg); }

#mobile-menu {
  position: fixed; inset: 0; z-index: 110; background: var(--bg);
  clip-path: inset(0 0 100% 0); visibility: hidden;
}
.mm-link { display: flex; align-items: baseline; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); overflow: hidden; }
.mm-text { font-size: clamp(2.4rem, 11vw, 4.5rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 600; display: inline-block; }

/* --------------------------------------------------------------------------
   Buttons, pills, tags
   -------------------------------------------------------------------------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 54px; padding: 0 28px; border-radius: 999px;
  font-weight: 500; font-size: 15px; white-space: nowrap;
  transition: color .4s var(--ease-out), border-color .4s, background-color .4s;
}
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-lg { height: 62px; font-size: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg);
  border-radius: inherit; transform: translateY(101%); transition: transform .6s var(--ease-out);
}
.btn-primary:hover::before { transform: translateY(0); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--fg); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .04); }
.btn-arrow { font-size: .85em; transition: transform .5s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(4px); }
[dir="rtl"] .btn .fa-arrow-right { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .fa-arrow-right { transform: scaleX(-1) translateX(4px); }
.btn[disabled] { opacity: .7; pointer-events: none; }

.pill {
  display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03);
  font-size: 13px; color: var(--fg); background: rgba(20, 20, 24, .8);
}
.pill-sm { height: 24px; padding: 0 10px; font-size: 11px; gap: 8px; }
.status-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.status-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent);
  animation: ping 2s var(--ease-out) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }

.tag {
  font: 500 11px/1 "Geist Mono", monospace; padding: 7px 10px; border-radius: 999px;
  color: var(--muted); border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
  transition: color .3s, border-color .3s;
}
.project-card:hover .tag { color: var(--fg); border-color: var(--line-2); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--muted);
  transition: color .3s, border-color .3s, background-color .3s, transform .5s var(--ease-out);
}
.icon-btn:hover { color: var(--fg); border-color: rgba(255, 255, 255, .4); transform: translateY(-2px); }
.icon-btn-accent:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* --------------------------------------------------------------------------
   Spotlight surface (mouse-follow border + glow)
   -------------------------------------------------------------------------- */
.spot {
  position: relative; isolation: isolate;
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, 0)) , var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.spot::before, .spot::after {
  content: ""; position: absolute; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .5s var(--ease-out);
}
.spot::before {
  inset: -1px; padding: 1px; z-index: 1;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), .7), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.spot::after {
  inset: 0; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), .07), transparent 60%);
}
.spot:hover::before, .spot:hover::after { opacity: 1; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
#hero-gl { opacity: 0; transition: opacity 1.6s ease; }
#hero-gl.is-ready { opacity: 1; }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 80% 20%, rgba(var(--accent-rgb), .08), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(120, 90, 255, .06), transparent 70%);
}
.hero-fade { position: absolute; inset-inline: 0; bottom: 0; height: 30%; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }

.hero-title {
  font-size: clamp(3.4rem, 10vw, 9rem); line-height: .88; letter-spacing: -.055em;
  font-variation-settings: "opsz" 96;
}
.hero-sub {
  font-size: clamp(2.2rem, 6vw, 5.4rem); line-height: 1; letter-spacing: -.02em;
  color: var(--muted); margin-top: .15em;
}
#hero-typing:not(:empty)::after { content: "▍"; color: var(--accent); margin-inline-start: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.portrait { position: relative; width: min(100%, 460px); aspect-ratio: 10 / 11; margin: 0; }
.portrait-frame {
  position: absolute; inset: 0; border-radius: 28px; overflow: hidden;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(60% 55% at 50% 100%, rgba(var(--accent-rgb), .32), transparent 72%),
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(180deg, #141418, #0d0d10);
  clip-path: inset(0 round 28px);
}
.portrait-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 100%;
  filter: grayscale(1) contrast(1.05);
  transform: scale(1.08); transform-origin: 50% 100%;
  transition: filter 1s var(--ease-out);
}
.portrait:hover .portrait-img { filter: grayscale(0) contrast(1); }
.portrait-scan { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.portrait-scan::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 40%;
  background: linear-gradient(180deg, transparent, rgba(var(--accent-rgb), .12), transparent);
  transform: translateY(-100%); animation: scan 5s var(--ease-io) infinite; will-change: transform;
}
@keyframes scan { to { transform: translateY(250%); } }
.corner { position: absolute; width: 18px; height: 18px; border-color: var(--accent); border-style: solid; border-width: 0; }
.corner.tl { top: -10px; left: -10px; border-top-width: 1px; border-left-width: 1px; }
.corner.tr { top: -10px; right: -10px; border-top-width: 1px; border-right-width: 1px; }
.corner.bl { bottom: -10px; left: -10px; border-bottom-width: 1px; border-left-width: 1px; }
.corner.br { bottom: -10px; right: -10px; border-bottom-width: 1px; border-right-width: 1px; }
.portrait-card {
  position: absolute; left: -28px; bottom: 32px; display: flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 10px; border-radius: 999px;
  background: rgba(20, 20, 24, .94); border: 1px solid var(--line-2);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
}
.float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  font: 500 12px/1 "Geist Mono", monospace; color: var(--fg);
  background: rgba(20, 20, 24, .94); border: 1px solid var(--line-2);
}
.float-chip i { color: var(--accent); }
.chip-0 { top: 8%; right: -36px; }
.chip-1 { top: 42%; left: -48px; }
.chip-2 { bottom: -18px; right: 18%; }
@media (max-width: 640px) {
  .portrait { width: min(82%, 340px); }
  .portrait-card { left: -12px; bottom: 20px; }
  .chip-0 { right: -12px; } .chip-1 { left: -20px; }
}

.scroll-line { position: relative; width: 1px; height: 36px; background: var(--line-2); overflow: hidden; }
.scroll-line span { position: absolute; inset-inline: 0; top: 0; height: 40%; background: var(--accent); animation: drip 2s var(--ease-io) infinite; }
@keyframes drip { 0% { transform: translateY(-100%); } 100% { transform: translateY(250%); } }

/* Marquee */
.marquee {
  position: relative; overflow: hidden; border-block: 1px solid var(--line); padding-block: 22px;
  -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 { display: flex; width: max-content; will-change: transform; }
.marquee-group { display: flex; align-items: center; flex: none; }
.marquee-item {
  display: inline-flex; align-items: center; gap: 14px; padding-inline: 28px;
  font: 500 clamp(1.4rem, 3vw, 2.4rem)/1 "Bricolage Grotesque", sans-serif; letter-spacing: -.03em; color: var(--muted);
  transition: color .3s;
}
.marquee-item i { font-size: .8em; color: var(--dim); }
.marquee-item:hover { color: var(--fg); }
.marquee-sep { color: var(--accent); font-size: 14px; }

/* --------------------------------------------------------------------------
   Section heads
   -------------------------------------------------------------------------- */
.sec-head { display: flex; align-items: flex-end; gap: clamp(12px, 2vw, 24px); margin-bottom: clamp(48px, 7vw, 96px); }
.sec-idx { font: 500 13px/1 "Geist Mono", monospace; color: var(--accent); padding-bottom: .9em; flex: none; }
.sec-title {
  font-family: "Bricolage Grotesque", "IBM Plex Sans Arabic", sans-serif; font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 6.2rem); line-height: .92; letter-spacing: -.045em;
}
.sec-line { flex: 1; height: 1px; background: var(--line-2); margin-bottom: .9em; transform-origin: left; min-width: 24px; }
[dir="rtl"] .sec-line { transform-origin: right; }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about-text {
  font-size: clamp(1.35rem, 2.4vw, 2.2rem); line-height: 1.3; letter-spacing: -.02em; font-weight: 400;
  text-wrap: pretty;
}
.about-text .word { transition: none; }

.highlights { display: grid; gap: 10px; margin-top: clamp(32px, 4vw, 48px); }
.highlight {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .02);
  font-size: 15px; color: var(--fg); transition: border-color .4s, background-color .4s;
}
.highlight:hover { border-color: rgba(var(--accent-rgb), .4); background: rgba(var(--accent-rgb), .04); }
.highlight-icon {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(var(--accent-rgb), .12); color: var(--accent); font-size: 14px;
}

.code-card { overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a2a30; }
.spot:hover .dots i:nth-child(1) { background: #ff5f57; }
.spot:hover .dots i:nth-child(2) { background: #febc2e; }
.spot:hover .dots i:nth-child(3) { background: #28c840; }
.dots i { transition: background-color .3s; }
.code-body { margin: 0; padding: 20px 18px 22px; font: 13px/1.75 "Geist Mono", monospace; color: var(--muted); overflow-x: auto; direction: ltr; text-align: left; }
.tk-k { color: #c792ea; } .tk-v { color: #82aaff; } .tk-p { color: var(--fg); } .tk-s { color: var(--accent); }
.code-caret { display: inline-block; width: 8px; height: 1.1em; background: var(--accent); vertical-align: text-bottom; margin-left: 4px; animation: blink 1s steps(1) infinite; }

.stat { padding: 18px 16px; display: flex; flex-direction: column; gap: 6px; }
.stat-num { font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-num::after { content: "+"; color: var(--accent); }
.stat-label { font: 500 10px/1.3 "Geist Mono", monospace; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }

/* --------------------------------------------------------------------------
   Skills
   -------------------------------------------------------------------------- */
.terminal { display: flex; align-items: center; gap: 6px; flex: none; white-space: nowrap; }
.term-caret { display: inline-block; width: 8px; height: 16px; background: var(--accent); animation: blink 1s steps(1) infinite; }

.filters {
  position: relative; display: flex; gap: 2px; padding: 4px; width: fit-content; max-width: 100%; min-width: 0; overflow-x: auto;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2);
}
.filter-pill { position: absolute; top: 4px; left: 0; height: calc(100% - 8px); border-radius: 999px; background: var(--fg); z-index: 0; }
.filter-btn {
  position: relative; z-index: 1; flex: none; height: 38px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; color: var(--muted); transition: color .35s; white-space: nowrap;
}
.filter-btn sup { font: 500 9px/1 "Geist Mono", monospace; margin-inline-start: 2px; opacity: .6; }
.filter-btn:hover { color: var(--fg); }
.filter-btn.is-active { color: var(--bg); }
html.no-js .filter-btn.is-active { background: var(--fg); }

/* No CSS transition on transform here: GSAP (reveal + Flip filter) owns this element's transform,
   and a CSS transition would restart on every GSAP frame for all cards — the main scroll-jank source. */
.skill-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; }
.skill-icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--bg-3); border: 1px solid var(--line); font-size: 20px; color: var(--fg);
  transition: color .4s, background-color .4s, border-color .4s, transform .6s var(--ease-out);
}
.skill-card:hover .skill-icon { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); transform: rotate(-8deg) scale(1.05); }
.skill-card.is-filtered { display: none; }

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */
.timeline { position: relative; padding-inline-start: 44px; }
.tl-track { position: absolute; top: 8px; bottom: 8px; inset-inline-start: 7px; width: 1px; background: var(--line-2); }
.tl-fill { position: absolute; inset: 0; background: linear-gradient(var(--accent), rgba(var(--accent-rgb), .25)); transform-origin: top; transform: scaleY(0); }
html.no-js .tl-fill { transform: none; }
.tl-item { position: relative; padding-bottom: clamp(48px, 6vw, 72px); }
.tl-item:last-child { padding-bottom: 0; }
.tl-node {
  position: absolute; top: 4px; inset-inline-start: -44px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line-2); transition: border-color .4s, background-color .4s, box-shadow .4s;
}
.tl-item.is-active .tl-node { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px rgba(var(--accent-rgb), .12); }
.tl-desc { display: grid; gap: 10px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.tl-desc li { position: relative; padding-inline-start: 22px; }
.tl-desc li::before { content: ""; position: absolute; inset-inline-start: 0; top: .75em; width: 10px; height: 1px; background: var(--accent); }

.edu-card { padding: 22px; }
.gpa {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none;
  font: 500 18px/1 "Geist Mono", monospace; color: var(--accent);
}
.gpa span { font-size: 9px; text-transform: uppercase; letter-spacing: .14em; }

/* --------------------------------------------------------------------------
   Projects
   -------------------------------------------------------------------------- */
.project-card {
  display: flex; flex-direction: column; padding: clamp(22px, 2.4vw, 32px); border-radius: 26px; min-height: 100%;
}
.project-card.is-hidden { display: none; }
.project-title {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 600;
  transition: color .4s;
}
.project-card:hover .project-title { color: var(--accent); }
.feature-list { display: grid; gap: 8px; }
.feature-list li { position: relative; padding-inline-start: 20px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.feature-list li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: 8px; height: 8px;
  border: 1px solid var(--accent); border-radius: 2px; transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-glow {
  position: absolute; left: 50%; top: 0; width: 1100px; height: 700px; transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 0%, rgba(var(--accent-rgb), .1), transparent 70%); pointer-events: none;
}
.contact-title {
  font-size: clamp(3.4rem, 12vw, 11.5rem); line-height: .86; letter-spacing: -.06em; font-weight: 600;
}
.mail-link { display: inline-block; }
.mail-text {
  font-size: clamp(1.4rem, 2.8vw, 2.3rem); letter-spacing: -.03em; font-weight: 500; word-break: break-all;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0% 1px no-repeat;
  transition: background-size .6s var(--ease-out), color .3s; padding-bottom: 4px;
}
.mail-link:hover .mail-text { background-size: 100% 1px; color: var(--accent); }

.social-list li { border-bottom: 1px solid var(--line); }
.social-list li:first-child { border-top: 1px solid var(--line); }
.social-list a {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 4px; color: var(--muted);
  transition: color .3s, padding .5s var(--ease-out);
}
.social-list a:hover { color: var(--fg); padding-inline: 16px 8px; }
.social-arrow { transform: rotate(-45deg); transition: transform .5s var(--ease-out), color .3s; }
.social-list a:hover .social-arrow { transform: rotate(0); color: var(--accent); }
[dir="rtl"] .social-arrow { transform: rotate(-135deg); }
[dir="rtl"] .social-list a:hover .social-arrow { transform: rotate(180deg); }

.contact-form { padding: clamp(24px, 4vw, 48px); border-radius: 28px; border: 1px solid var(--line); background: rgba(17, 17, 20, .85); }
.field { position: relative; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-2);
  padding: 30px 0 12px; color: var(--fg); font-size: 16px; outline: none; resize: none; border-radius: 0;
  transition: border-color .3s;
}
.field input[type="number"] { -moz-appearance: textfield; }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field label {
  position: absolute; inset-inline-start: 0; top: 30px; color: var(--muted); font-size: 16px; pointer-events: none;
  transform-origin: left top; transition: transform .45s var(--ease-out), color .3s;
}
[dir="rtl"] .field label { transform-origin: right top; }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-24px) scale(.78); color: var(--accent); }
.field-captcha label { transform: translateY(-24px) scale(.78); }
.field .bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-out); }
[dir="rtl"] .field .bar { transform-origin: right; }
.field input:focus ~ .bar, .field textarea:focus ~ .bar { transform: scaleX(1); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #ff5f57; }
.field.is-invalid label { color: #ff7a73; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer { position: relative; overflow: hidden; }
.footer-name {
  display: flex; justify-content: space-between; gap: .1em; padding-block: clamp(24px, 4vw, 48px) clamp(16px, 2vw, 24px);
  font-size: clamp(4.5rem, 19vw, 19rem); line-height: .8; letter-spacing: -.07em; font-weight: 700;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .16);
  user-select: none; white-space: nowrap; direction: ltr;
}
.footer-name span { display: inline-block; transition: color .8s var(--ease-out), -webkit-text-stroke-color .8s; }
.footer-name:hover span { color: var(--accent); -webkit-text-stroke-color: var(--accent); }

/* Toasts */
#toasts { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 450; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; max-width: 360px; padding: 14px 18px; border-radius: 16px;
  background: rgba(17, 17, 20, .92); border: 1px solid var(--line-2); font-size: 14px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
  pointer-events: auto;
}
.toast i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; flex: none; font-size: 12px; }
.toast.is-success i { background: var(--accent); color: var(--accent-ink); }
.toast.is-error i { background: #ff5f57; color: #1a0000; }

/* --------------------------------------------------------------------------
   Motion helpers & accessibility
   -------------------------------------------------------------------------- */
/* SplitText masks: leave room for Turkish diacritics (Ö, Ü, Ç, Ş) and italic overhang */
.word-mask, .char-mask { padding-block: .14em; margin-block: -.14em; padding-inline: .03em; margin-inline: -.03em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { animation: none; }
}
