/* ============================================================
   Abdullah Karadeniz — Portfolio  |  dezinobjects inspired
   ============================================================ */

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

/* ── CROSSHAIR CURSOR ────────────────────────────── */
@media (pointer: fine) {
  * { cursor: none !important; }

  .xcursor {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    transition: opacity 0.2s;
  }
  .xcursor.hidden { opacity: 0; }

  .xc-h, .xc-v, .xc-o {
    position: absolute;
    transform: translate(-50%, -50%);
  }
  .xc-h {
    width: 22px; height: 1.5px;
    background: #D54E21;
    transition: width 0.2s var(--ease);
  }
  .xc-v {
    width: 1.5px; height: 22px;
    background: #D54E21;
    transition: height 0.2s var(--ease);
  }
  .xc-o {
    width: 0; height: 0;
    border: 1.5px solid #D54E21;
    border-radius: 50%;
    opacity: 0;
    transition: width 0.25s var(--ease), height 0.25s var(--ease), opacity 0.2s;
  }

  .xcursor.hover .xc-h { width: 8px; }
  .xcursor.hover .xc-v { height: 8px; }
  .xcursor.hover .xc-o { width: 38px; height: 38px; opacity: 1; }

  /* lightbox: white crosshair */
  .lightbox.open ~ * .xcursor .xc-h,
  .lightbox.open ~ * .xcursor .xc-v { background: var(--black); }
}

:root {
  --white:   #ffffff;
  --black:   #0a0a0a;
  --gray:    #6b6b6b;
  --light:   #f5f3f0;
  --border:  #e0ddd8;
  --accent:  #0a0a0a;
  --font:    'Space Grotesk', system-ui, sans-serif;
  --mono:    'Space Mono', monospace;
  --nav-h:   64px;
  --ease:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; font-size: 16px; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
body { background: var(--white); color: var(--black); font-family: var(--font); font-weight: 400; line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); }

/* ── NAV ─────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
#nav.scrolled { border-bottom-color: var(--border); }

.nav-name {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--black);
}

.nav-right {
  display: flex;
  gap: 36px;
}
.nav-right a {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--gray);
  transition: color 0.2s;
  position: relative;
}
.nav-right a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 100%;
  height: 1px;
  background: var(--black);
  transition: right 0.3s var(--ease);
}
.nav-right a:hover { color: var(--black); }
.nav-right a:hover::after { right: 0; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
}
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 5px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--gray);
  transition: color 0.2s;
  line-height: 1;
}
.lang-btn.active,
.lang-btn:hover { color: var(--black); }
.lang-btn.active { font-weight: 700; }
.lang-sep {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--gray);
  opacity: 0.5;
  pointer-events: none;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--black);
  transition: transform 0.3s, opacity 0.3s;
}

/* ── MOBILE MENU ─────────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 190;
  background: var(--white);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 40px;
  transform: translateY(-100%);
  transition: transform 0.4s var(--ease);
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateY(0);
  pointer-events: all;
}
.mm-link {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--black);
}

/* ── SECTION LABEL ───────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 60px;
}
.section-label span:first-child {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gray);
}
.label-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── HERO ────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; align-items: flex-end;
  padding: calc(var(--nav-h) + 80px) 40px 80px;
  position: relative;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.hero-inner { max-width: 1000px; }

.hero-tag {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--gray);
  margin-bottom: 32px;
  font-family: var(--mono);
}

.hero-name {
  font-size: clamp(3.5rem, 10vw, 10rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
  color: var(--black);
}

.hero-desc {
  font-size: 1rem;
  color: var(--gray);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 48px;
  max-width: 360px;
}

.cta-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--black);
  border-bottom: 1px solid var(--black);
  padding-bottom: 6px;
  transition: gap 0.3s, color 0.2s;
}
.cta-arrow:hover { gap: 20px; }

.hero-scroll-hint {
  position: absolute;
  right: 40px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-track {
  width: 1px;
  height: 80px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.scroll-thumb {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40px;
  background: var(--black);
  animation: scrollDown 2s ease-in-out infinite;
  will-change: transform;
}
@keyframes scrollDown {
  0%   { transform: translateY(-100%); }
  50%  { transform: translateY(100%); }
  100% { transform: translateY(300%); }
}

/* ── WORK ────────────────────────────────────────── */
#work {
  padding: 100px 40px;
  background: var(--white);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
}

.work-item {
  background: var(--white);
  display: block;
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  position: relative;
}

.work-img {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--light);
}
.work-img svg,
.work-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.6s var(--ease);
}
.work-item:hover .work-img svg,
.work-item:hover .work-img img {
  transform: scale(1.05);
}

.work-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s;
}
.work-overlay span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--white);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.work-item:hover .work-overlay {
  background: rgba(10,10,10,0.4);
}
.work-item:hover .work-overlay span {
  opacity: 1;
  transform: translateY(0);
}

/* ── LIGHTBOX ────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lb-close {
  position: absolute;
  top: 24px; right: 28px;
  background: none; border: none;
  color: rgba(0,0,0,0.45);
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
  z-index: 10;
}
.lb-close:hover { color: var(--black); }

.lb-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: rgba(0,0,0,0.35);
  cursor: pointer;
  padding: 16px;
  transition: color 0.2s;
  z-index: 10;
}
.lb-nav:hover { color: var(--black); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

.lb-stage {
  width: 100%;
  max-width: 90vw;
  max-height: 80vh;
  overflow: hidden;
  position: relative;
}

.lb-track {
  display: flex;
  transition: transform 0.45s var(--ease);
  height: 80vh;
}

.lb-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-slide svg,
.lb-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}
img.loaded { opacity: 1 !important; }

.lb-footer {
  position: absolute;
  bottom: 24px;
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lb-counter {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(0,0,0,0.4);
  font-family: var(--mono);
}

.lb-dots {
  display: flex;
  gap: 8px;
}
.lb-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.lb-dot.active {
  background: var(--black);
  transform: scale(1.3);
}

/* ── SCROLL GALLERIES ────────────────────────────── */
#interior,
#academic {
  padding-top: 80px;
  padding-bottom: 80px;
  background: var(--white);
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.sg-header {
  padding: 0 40px;
  margin-bottom: 40px;
}

.scroll-gallery {
  overflow: hidden;
  position: relative;
  cursor: grab;
  user-select: none;
}
.scroll-gallery:active { cursor: grabbing; }

/* fade edges */
.scroll-gallery::before,
.scroll-gallery::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.scroll-gallery::before {
  left: 0;
  background: linear-gradient(to right, var(--white), transparent);
}
.scroll-gallery::after {
  right: 0;
  background: linear-gradient(to left, var(--white), transparent);
}

.sg-track {
  display: flex;
  gap: 2px;
  width: max-content;
  animation: sgScroll linear infinite;
  will-change: transform;
}
.scroll-gallery:hover .sg-track {
  animation-play-state: paused;
}
/* after drag: prevent hover-pause from immediately re-freezing the animation */
.scroll-gallery.drag-released .sg-track {
  animation-play-state: running !important;
}

@keyframes sgScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.sg-item {
  flex-shrink: 0;
  width: 420px;
  aspect-ratio: 4 / 3;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  display: block;
}

.sg-img {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.sg-img svg,
.sg-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.6s var(--ease);
}
.sg-item:hover .sg-img svg,
.sg-item:hover .sg-img img {
  transform: scale(1.06);
}
.sg-item:hover .work-overlay {
  background: rgba(10,10,10,0.4);
}
.sg-item:hover .work-overlay span {
  opacity: 1;
  transform: translateY(0);
}

/* ── ABOUT ───────────────────────────────────────── */
#about {
  padding: 100px 40px;
  background: var(--light);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}

.about-left .section-label { margin-bottom: 32px; }

.about-img-wrap {
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--border);
}
.about-img-wrap svg,
.about-img-wrap img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.6s var(--ease);
}
.about-img-wrap:hover svg,
.about-img-wrap:hover img { transform: scale(1.03); }

.about-heading {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}
.about-heading em {
  font-style: normal;
  -webkit-text-stroke: 1.5px var(--black);
  color: transparent;
}

.about-text {
  font-size: 0.92rem;
  color: var(--gray);
  line-height: 1.85;
  font-weight: 300;
  margin-bottom: 16px;
  max-width: 460px;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stat-item::before {
  content: '—';
  font-size: 0.65rem;
  color: var(--gray);
  flex-shrink: 0;
}
.sl {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--gray);
  font-family: var(--mono);
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.about-skills span {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--gray);
  border: 1px solid var(--border);
  padding: 6px 14px;
  transition: border-color 0.2s, color 0.2s;
}
.about-skills span:hover {
  border-color: var(--black);
  color: var(--black);
}

/* ── AWARDS ──────────────────────────────────────── */
#awards {
  padding: 100px 40px;
  background: var(--light);
  border-top: 1px solid var(--border);
  content-visibility: auto;
  contain-intrinsic-size: 0 800px;
}

.awards-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.award-year-group {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0 40px;
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.award-year {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gray);
  font-family: var(--mono);
  padding-top: 4px;
  flex-shrink: 0;
}

.award-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.award-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.award-item:last-child { border-bottom: none; }
.award-item:hover { background: rgba(0,0,0,0.02); }

.award-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.award-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 22px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-family: var(--mono);
  margin-top: 2px;
}
.award-badge.gold    { background: #c9a84c; color: #fff; }
.award-badge.first   { background: var(--black); color: #fff; }
.award-badge.second  { background: #6b6b6b; color: #fff; }
.award-badge.special { background: #5a7a96; color: #fff; }
.award-badge.finalist{ background: transparent; color: var(--gray); border: 1px solid var(--border); }
.award-badge.prod    { background: #3a7d5a; color: #fff; }

.award-info { flex: 1; min-width: 0; }

.award-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--black);
  letter-spacing: 0.01em;
  line-height: 1.35;
  margin-bottom: 3px;
}

.award-sub {
  font-size: 0.78rem;
  color: var(--black);
  font-weight: 400;
  margin-bottom: 4px;
  line-height: 1.4;
}

.award-org {
  font-size: 0.68rem;
  color: var(--gray);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.award-project {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gray);
  font-family: var(--mono);
  white-space: nowrap;
  padding-top: 4px;
  min-width: 80px;
  text-align: right;
}

@media (max-width: 768px) {
  #awards { padding: 72px 24px; }
  .award-year-group { grid-template-columns: 1fr; gap: 16px; }
  .award-item { flex-direction: column; gap: 8px; }
  .award-project { text-align: left; }
}

/* ── CTA ─────────────────────────────────────────── */
#cta {
  padding: 120px 40px;
  background: var(--black);
  text-align: center;
}
.cta-heading {
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--white);
  margin-bottom: 56px;
}
.cta-btn {
  display: inline-block;
  padding: 18px 56px;
  border: 1px solid var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--white);
  transition: background 0.3s, color 0.3s;
}
.cta-btn:hover {
  background: var(--white);
  color: var(--black);
}

/* ── CONTACT ─────────────────────────────────────── */
#contact {
  padding: 100px 40px;
  background: var(--white);
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
}

.contact-intro {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 48px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}
.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cl-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gray);
  font-family: var(--mono);
}
.contact-list a, .contact-list span {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--black);
  transition: color 0.2s;
}
.contact-list a:hover { color: var(--gray); }

.social-links {
  display: flex;
  gap: 16px;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  color: var(--gray);
  transition: color 0.2s, border-color 0.2s;
}
.social-link:hover {
  color: var(--black);
  border-color: var(--black);
}

/* ── FOOTER ──────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-name {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.footer-copy {
  font-size: 0.62rem;
  color: var(--gray);
  letter-spacing: 0.1em;
  font-family: var(--mono);
}
.footer-social {
  display: flex;
  gap: 14px;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  transition: color 0.2s;
}
.footer-social a:hover { color: var(--black); }

/* ── ANIMATIONS ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1024px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  /* Lightbox mobile */
  .lightbox { background: rgba(255,255,255,0.85); }
  .lb-stage {
    max-width: 100vw;
    max-height: 78vh;
  }
  .lb-track { height: 78vh; }
  .lb-nav { padding: 12px; }
  .lb-prev { left: 4px; }
  .lb-next { right: 4px; }
  .lb-close { top: 16px; right: 16px; }

  #nav { padding: 0 24px; }
  .nav-right { display: none; }
  .burger { display: flex; }
  #hero { padding: calc(var(--nav-h) + 48px) 24px 64px; }
  .hero-scroll-hint { display: none; }
  #work, #about, #cta, #contact { padding: 72px 24px; }
  #interior, #academic { padding-top: 56px; padding-bottom: 56px; }
  .sg-header { padding: 0 24px; }
  .sg-item { width: 280px; }
  .work-grid { grid-template-columns: 1fr; gap: 1px; }
  .about-inner { grid-template-columns: 1fr; gap: 48px; }
  .contact-inner { grid-template-columns: 1fr; gap: 56px; }
  footer { padding: 28px 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ── MOBILE MENU LANG SWITCH ─────────────────────── */
.mm-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.mm-lang .lang-btn {
  font-size: 0.85rem;
  padding: 4px 8px;
  letter-spacing: 0.16em;
}
.mm-lang .lang-sep {
  font-size: 0.85rem;
}
