/* =============================================================
   Mert Topcu — Portfolio
   Apple-inspired Minimalist Design
   ============================================================= */

/* ---- TOKENS ---- */
:root {
  --white:       #ffffff;
  --off-white:   #f9f9f7;
  --black:       #0a0a0a;
  --ink:         #1a1a1a;
  --muted:       #6e6e73;
  --border:      #e0e0e0;
  --border-light:#ebebeb;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --header-h:    90px;
  --max-w:       1200px;
  --pad-x:       48px;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--white); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }


/* ---- LAYOUT HELPERS ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  z-index: 200;
  transition: box-shadow 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Identity (logo area) */
.identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.1;
}

.identity-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--black);
}

.identity-role {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header right */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Contact button */
.btn-contact {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

.btn-contact:hover {
  background: var(--ink);
  color: var(--white);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 36px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.hamburger.open span:first-child { transform: rotate(45deg) translate(3px, 3px); }
.hamburger.open span:last-child  { transform: rotate(-45deg) translate(3px, -3px); }

/* Mobile nav — fixed dropdown below header */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  z-index: 199;
  flex-direction: column;
  padding: 0 var(--pad-x);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--ease-out);
}

.mobile-nav.open {
  max-height: 240px;
  padding: 0 var(--pad-x);
}

.mobile-nav-link {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.mobile-nav-link:last-child { border-bottom: none; }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .btn-contact { display: none; }
  .mobile-nav { display: flex; }
  :root { --pad-x: 24px; }
}

/* ============================================================
   HERO / ABOUT
   ============================================================ */
.hero {
  padding-top: calc(var(--header-h) + 80px);
  padding-bottom: 120px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 80px;
  align-items: flex-start;
}

/* Photo column */
.hero-photo-col {
  /* sticky only kicks in on desktop via the media query below */
}

.photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: var(--off-white);
  border: 1px solid var(--border-light);
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
  filter: grayscale(15%);
  transition: filter 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.photo-frame:hover .profile-img {
  filter: grayscale(0%);
  transform: scale(1.02);
}

.photo-initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 400;
  color: var(--border);
  pointer-events: none;
  z-index: 0;
}

@media (min-width: 901px) {
  .hero-photo-col {
    position: sticky;
    top: calc(var(--header-h) + 40px);
  }
}

.hero-text-col {
  padding-top: 8px;
}

.about-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.about-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--black);
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

.about-body {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
  max-width: 520px;
}

/* Qualities */
.about-qualities {
  margin-top: 52px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border-light);
}

.quality-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
}

.quality-label {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.quality-desc {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.5;
}

/* Responsive hero */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-photo-col {
    position: static; /* no sticky on mobile */
    order: 1;         /* always render photo first */
  }

  .hero-text-col {
    order: 2;         /* text always below photo */
  }

  /* Hide the "About Me" eyebrow label on mobile — it causes a phantom
     text flash above the photo and is redundant with the headline */
  .about-eyebrow {
    display: none;
  }

  .photo-frame {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 3 / 4;   /* taller — shows full body including feet */
  }

  .profile-img {
    object-position: center center; /* show full figure */
  }

  .quality-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ============================================================
   WORKS SECTION LABEL
   ============================================================ */
.section-label-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 0;
  padding-bottom: 60px;
  border-top: 1px solid var(--border-light);
  padding-top: 40px;
}

.section-label {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 500;
  color: var(--black);
  letter-spacing: -0.01em;
  white-space: nowrap;
  line-height: 1;
}

.section-label-line {
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.section-count {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 400;
}

/* ============================================================
   PROJECT CARDS
   ============================================================ */
.works {
  padding-bottom: 120px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 48px;
  row-gap: 88px;
}

@media (max-width: 768px) {
  .works-grid {
    grid-template-columns: 1fr;
    row-gap: 60px;
  }
}

/* Card */
.project-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Card image */
.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--off-white);
  border: 1px solid var(--border-light);
  margin-bottom: 22px;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out), filter 0.5s ease;
  filter: brightness(0.97);
}

.card-link:hover .card-img {
  transform: scale(1.04);
  filter: brightness(1);
}

/* Overlay on hover */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.card-link:hover .card-overlay {
  opacity: 1;
}

.overlay-cta {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.7);
  padding: 10px 22px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Card body */
.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-index {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
  min-width: 22px;
}

.card-tag {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  flex: 1;
}

.card-year {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--black);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.card-link:hover .card-title {
  color: var(--muted);
}

.card-desc {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.card-tags li {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  letter-spacing: 0.02em;
}

/* ============================================================
   CTA STRIP
   ============================================================ */
.cta-strip {
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 80px 0;
  background: var(--off-white);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

@media (max-width: 600px) {
  .cta-inner {
    flex-direction: column;
    text-align: center;
  }
}

.cta-text {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  color: var(--black);
  line-height: 1.2;
}

.btn-cta-large {
  display: inline-flex;
  align-items: center;
  padding: 14px 36px;
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn-cta-large:hover {
  background: transparent;
  color: var(--ink);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 60px 0;
  background: var(--white);
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--black);
  text-transform: uppercase;
}

.footer-tagline {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

@media (max-width: 600px) {
  .footer-right { align-items: flex-start; }
}

.footer-email {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}

.footer-email::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}

.footer-email:hover::after { transform: scaleX(1); }

.footer-copy {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 300;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-page {
  padding-top: calc(var(--header-h) + 100px);
  padding-bottom: 120px;
  min-height: 80vh;
}

.contact-inner {
  max-width: 640px;
}

.contact-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.contact-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--black);
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

.contact-body {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 16px;
  max-width: 500px;
}

.contact-email-block {
  margin-top: 52px;
  padding-top: 40px;
  border-top: 1px solid var(--border-light);
}

.contact-email-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  display: block;
}

.contact-email-link {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}

.contact-email-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 1px;
  background: var(--black);
  transform: scaleX(0.2);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.contact-email-link:hover::after { transform: scaleX(1); }

/* ============================================================
   FADE-IN UTILITY
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out),
              transform 0.6s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
