/* ================================================================
   STYLE.CSS  —  Erdi Taşkın Portfolio
   ================================================================ */

/* ── VARIABLES & RESET ─────────────────────────────────────────── */
:root {
  --bg:        #080808;
  --fg:        #f0ede6;
  --fg-dim:    #5a5753;
  --accent:    #d4f064;
  --gutter:    clamp(1.25rem, 5vw, 5rem);
  --f-display: 'Syne', sans-serif;
  --f-body:    'DM Sans', sans-serif;
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io:   cubic-bezier(0.87, 0, 0.13, 1);
}

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

html { scroll-behavior: auto; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
}

/* hide default cursor on desktop */
@media (hover: hover) {
  body { cursor: none; }
  a, button { cursor: none; }
}

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

/* grain overlay */
body::after {
  content: '';
  position: fixed; inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

/* ── LOADER ────────────────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0;
  z-index: 9000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.loader-hello {
  font-family: var(--f-display);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  /* no overflow:hidden here — let descenders show */
}

.loader-bar-wrap {
  width: clamp(160px, 28vw, 300px);
  height: 1px;
  background: rgba(240,237,230,.1);
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
}

.loader-num {
  font-family: var(--f-display);
  font-size: .7rem;
  letter-spacing: .18em;
  color: var(--fg-dim);
}

/* ── CURSOR ────────────────────────────────────────────────────── */
#cursor-dot,
#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9800;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Small solid dot — always visible */
#cursor-dot {
  width: 8px; height: 8px;
  background: var(--fg);
  z-index: 9801;
  transition: width .25s var(--ease-expo),
              height .25s var(--ease-expo),
              background .25s;
}

/* Larger ring that lags behind */
#cursor-ring {
  width: 42px; height: 42px;
  border: 1.5px solid rgba(240,237,230,.4);
  display: flex; align-items: center; justify-content: center;
  transition: width .35s var(--ease-expo),
              height .35s var(--ease-expo),
              border-color .3s,
              background .3s;
}

#cursor-label {
  font-family: var(--f-display);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bg);
  opacity: 0;
  transition: opacity .2s;
  white-space: nowrap;
  user-select: none;
}

/* States */
body.cs-hover #cursor-dot  { width: 64px; height: 64px; background: var(--accent); }
body.cs-hover #cursor-ring { width: 0; height: 0; border-color: transparent; }
body.cs-hover #cursor-label { opacity: 1; }

body.cs-link  #cursor-ring { border-color: var(--accent); }
body.cs-link  #cursor-dot  { background: var(--accent); }

/* hide cursor on touch */
@media (hover: none) {
  #cursor-dot, #cursor-ring { display: none; }
}

/* ── HOVER PREVIEW ─────────────────────────────────────────────── */
#hover-preview {
  position: fixed;
  top: 0; left: 0;
  width: 320px;
  pointer-events: none;
  z-index: 500;
  opacity: 0;
  transform: translate(-50%, -55%) scale(.88) rotate(-4deg);
  transition: opacity .4s var(--ease-expo),
              transform .4s var(--ease-expo);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}

#hover-preview.is-active {
  opacity: 1;
  transform: translate(-50%, -55%) scale(1) rotate(0deg);
}

#hover-preview img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

/* ── PAGE TRANSITION CURTAIN ───────────────────────────────────── */
#curtain {
  position: fixed; inset: 0;
  background: var(--accent);
  z-index: 8000;
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}

/* ── NAV ───────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 700;
  padding: 1.75rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--f-display);
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  z-index: 701;
  position: relative;
}

.nav-links {
  display: flex;
  gap: 2.25rem;
}

.nav-links a {
  font-family: var(--f-display);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .45;
  transition: opacity .3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--fg);
  transition: width .4s var(--ease-expo);
}

.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after { width: 100%; }

/* Burger (mobile) */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: .4rem;
  z-index: 701;
  position: relative;
}

.nav-burger span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--fg);
  transition: transform .4s var(--ease-expo), opacity .3s;
  transform-origin: center;
}

.nav-burger.is-open span:first-child  { transform: translateY(3.25px) rotate(45deg); }
.nav-burger.is-open span:last-child   { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}

/* ── MOBILE NAV ────────────────────────────────────────────────── */
.mobile-nav {
  position: fixed; inset: 0;
  z-index: 690;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s var(--ease-expo);
}

.mobile-nav.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-nav-link {
  font-family: var(--f-display);
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  opacity: .25;
  transition: opacity .3s;
}

.mobile-nav-link:hover { opacity: 1; }

.mobile-nav-foot {
  font-size: .75rem;
  color: var(--fg-dim);
  letter-spacing: .08em;
}

/* ── HERO ──────────────────────────────────────────────────────── */
#hero {
  min-height: 100svh;
  padding: 0 var(--gutter);
  padding-top: clamp(7rem, 15vw, 12rem);
  padding-bottom: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-eyebrow {
  font-family: var(--f-display);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 2rem;
}

/* Clip reveal helper */
.reveal-clip {
  display: inline-block;
  overflow: hidden;          /* clip is on the span itself */
}

.reveal-clip > * {
  display: inline-block;
  transform: translateY(105%);
}

/* Hero headline — key fix for ş descender */
.hero-headline {
  font-family: var(--f-display);
  font-size: clamp(3.8rem, 12vw, 12rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  /* Extra bottom padding so descenders like ş aren't clipped */
  padding-bottom: .08em;
}

.hero-line {
  display: block;
  /* overflow VISIBLE so ş tail shows */
  overflow: visible;
  line-height: 1.05;
}

.hero-word {
  display: inline-block;
  transform: translateY(110%);
  /* also allow descenders */
  overflow: visible;
}

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 4rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.hero-desc {
  max-width: 380px;
  font-size: clamp(.9rem, 1.6vw, 1.05rem);
  color: var(--fg-dim);
  opacity: 0;
}

.hero-scroll-hint {
  display: flex;
  align-items: center;
  gap: .75rem;
  opacity: 0;
}

.scroll-line {
  width: 52px; height: 1px;
  background: var(--fg-dim);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.scroll-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: slide-bar 2.2s ease-in-out infinite;
}

@keyframes slide-bar {
  0%   { transform: scaleX(0); transform-origin: left; }
  49%  { transform: scaleX(1); transform-origin: left; }
  50%  { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

.scroll-text {
  font-family: var(--f-display);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ── MARQUEE ───────────────────────────────────────────────────── */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid rgba(240,237,230,.07);
  border-bottom: 1px solid rgba(240,237,230,.07);
  padding: 1.25rem 0;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 0;
  animation: marquee 20s linear infinite;
}

.marquee-track span {
  font-family: var(--f-display);
  font-size: clamp(.85rem, 1.6vw, 1.1rem);
  font-weight: 600;
  letter-spacing: .07em;
  color: var(--fg-dim);
  padding: 0 1.5rem;
}

.marquee-track .bullet { color: var(--accent); padding: 0 .25rem; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── ABOUT ─────────────────────────────────────────────────────── */
#about {
  padding: clamp(5rem, 12vw, 12rem) var(--gutter);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
}

@media (max-width: 768px) { #about { grid-template-columns: 1fr; } }

.section-label {
  font-family: var(--f-display);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  display: block;
}

.about-text {
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 300;
  line-height: 1.45;
  margin-bottom: 2.5rem;
}

.about-text strong { font-family: var(--f-display); font-weight: 700; }
.about-text em     { font-style: italic; color: var(--fg-dim); }

/* CTA button */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--f-display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--fg);
  padding: .95rem 1.9rem;
  border-radius: 100px;
  transition: background .3s, color .3s;
  position: relative;
  overflow: hidden;
}

.cta-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease-expo);
}

.cta-btn span, .cta-btn svg { position: relative; z-index: 1; }
.cta-btn:hover::before { transform: scaleX(1); }

/* Stats */
.about-right { display: flex; flex-direction: column; gap: 0; }

.stat-card {
  border-top: 1px solid rgba(240,237,230,.09);
  padding: 1.75rem 0;
}

.stat-card:last-child { border-bottom: 1px solid rgba(240,237,230,.09); }

.stat-num {
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
}

.stat-num .accent { color: var(--accent); }

.stat-label {
  font-size: .82rem;
  color: var(--fg-dim);
  margin-top: .3rem;
  letter-spacing: .05em;
}

/* ── WORK ──────────────────────────────────────────────────────── */
#work {
  padding: clamp(4rem, 10vw, 10rem) var(--gutter);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(240,237,230,.09);
  margin-bottom: clamp(2.5rem, 5vw, 5rem);
  gap: 1rem;
}

.section-title {
  font-family: var(--f-display);
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
}

.section-count {
  font-family: var(--f-display);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  white-space: nowrap;
}

/* Project list */
.projects-list { display: flex; flex-direction: column; }

.project-item { border-bottom: 1px solid rgba(240,237,230,.08); }

.project-link {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  position: relative;
  overflow: hidden;
  transition: padding-left .45s var(--ease-expo);
}

/* hover fill */
.project-link::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(212,240,100,.04);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease-expo);
}

.project-item:hover .project-link::before { transform: scaleX(1); }
.project-item:hover .project-link { padding-left: 1.25rem; }

.project-index {
  font-family: var(--f-display);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--fg-dim);
  min-width: 2rem;
}

.project-name {
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 4.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  flex: 1;
}

.project-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .2rem;
  margin-left: auto;
}

.project-type {
  font-size: .7rem;
  color: var(--fg-dim);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-year {
  font-family: var(--f-display);
  font-size: .7rem;
  font-weight: 700;
  color: var(--fg-dim);
  letter-spacing: .06em;
}

.project-arrow {
  font-size: 1.3rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .35s, transform .35s var(--ease-expo);
  flex-shrink: 0;
}

.project-item:hover .project-arrow {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 500px) {
  .project-meta { display: none; }
  .project-arrow { display: none; }
}

/* ── SKILLS ────────────────────────────────────────────────────── */
#skills {
  padding: clamp(4rem, 10vw, 10rem) var(--gutter);
  background: #0c0c0c;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 1px;
  background: rgba(240,237,230,.06);
  margin-top: clamp(2.5rem, 5vw, 5rem);
}

.skill-card {
  background: #0c0c0c;
  padding: 2rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  position: relative;
  transition: background .35s;
}

.skill-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease-expo);
}

.skill-card:hover { background: #111; }
.skill-card:hover::after { transform: scaleX(1); }

.skill-icon {
  font-size: 1.4rem;
  margin-bottom: .6rem;
  filter: grayscale(1);
  transition: filter .3s;
  line-height: 1;
}

.skill-card:hover .skill-icon { filter: none; }

.skill-card strong {
  font-family: var(--f-display);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.2;
}

.skill-card span {
  font-size: .72rem;
  color: var(--fg-dim);
  letter-spacing: .05em;
}

/* ── CONTACT ───────────────────────────────────────────────────── */
#contact {
  padding: clamp(6rem, 16vw, 16rem) var(--gutter) clamp(5rem, 10vw, 10rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-bg-word {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--f-display);
  font-size: clamp(5rem, 20vw, 18rem);
  font-weight: 800;
  letter-spacing: -.05em;
  color: rgba(240,237,230,.025);
  pointer-events: none;
  white-space: nowrap;
  line-height: 1;
  user-select: none;
}

.contact-headline {
  font-family: var(--f-display);
  font-size: clamp(2.8rem, 9vw, 9rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
  margin-bottom: clamp(2rem, 5vw, 4rem);
  /* descender fix */
  padding-bottom: .06em;
}

/* email link */
.email-link {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--f-display);
  font-size: clamp(.9rem, 2.5vw, 1.4rem);
  font-weight: 700;
  letter-spacing: .05em;
  border: 1px solid rgba(240,237,230,.15);
  padding: 1.1rem 2.25rem;
  border-radius: 100px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, color .3s;
}

.email-link::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .4s var(--ease-expo);
}

.email-link span { position: relative; z-index: 1; }
.email-link:hover { border-color: var(--accent); color: var(--bg); }
.email-link:hover::before { transform: scaleY(1); }

/* socials */
.contact-socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-top: 2.5rem;
}

.social-link {
  font-family: var(--f-display);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  transition: color .3s;
}

.social-link:hover { color: var(--fg); }

/* ── FOOTER ────────────────────────────────────────────────────── */
footer {
  padding: 1.75rem var(--gutter);
  border-top: 1px solid rgba(240,237,230,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}

.footer-copy,
.footer-role {
  font-size: .72rem;
  color: var(--fg-dim);
  letter-spacing: .05em;
}

/* ── MAGNETIC ──────────────────────────────────────────────────── */
.magnetic { will-change: transform; }

/* ── UTILITIES ─────────────────────────────────────────────────── */
@media (max-width: 400px) {
  footer { flex-direction: column; align-items: flex-start; }
  .footer-role { display: none; }
}