/* ====================================================
   Duru Erdem — Portfolio
   ==================================================== */

/*
  FONT NOTE:
  Archivo is now self-hosted directly from assets/fonts/ (real font
  files, not a Google Fonts network request), so it loads reliably
  regardless of network conditions, ad/privacy blockers, or opening
  the file locally via file://. Genuine ExtraLight through ExtraBold
  weights are included as actual font files, so weight settings now
  render as true distinct faces instead of being faked or rounded up
  by a fallback system font.
*/
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #111111;
  --body-color: #404040;
  --gray: #6f6f6f;
  --light-gray: #e5e5e5;
  --accent: #2374a9;
  --accent-light: #e3f0f8;
  --white: #ffffff;
  --max-width: 1320px;
  --side-padding: 80px;
  --radius: 20px;
  --indent: 180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-weight: 700;
  margin: 0;
}

p {
  line-height: 1.6;
  margin: 0 0 20px 0;
  font-weight: 400;
  color: var(--body-color);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--side-padding);
}

/* focus visibility for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------------- Header / Nav ---------------- */
.site-header {
  padding: 40px 0 64px;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.main-nav ul {
  display: flex;
  gap: 42px;
}

.main-nav a {
  font-size: 17px;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.main-nav a:hover {
  color: var(--accent);
}

.main-nav a.active {
  border-bottom-color: var(--black);
  font-weight: 700;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
  z-index: 200;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--black);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------------- Hero (home page) ---------------- */
.hero-section {
  padding: 0 0 90px;
}

/* ---------------- Section headings ---------------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-head h2 {
  font-size: 32px;
}

.section-head .more-link {
  font-size: 17px;
  color: var(--gray);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.section-head .more-link:hover {
  color: var(--accent);
}

.page-title {
  font-size: 34px;
  margin-bottom: 36px;
}

/* ---------------- Project / Illustration Grid ---------------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 40px;
  margin-bottom: 90px;
}

.project-card {
  display: block;
}

.project-card figure {
  margin: 0 0 18px 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--light-gray);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover img {
  transform: scale(1.035);
}

.project-card .p-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.project-card .p-title h3 {
  font-size: 19px;
  font-weight: 600;
}

.project-card .p-meta {
  font-size: 15px;
  color: var(--gray);
  white-space: nowrap;
}

/* ---------------- Work together / form embed ---------------- */
.work-together {
  margin-bottom: 90px;
}

.work-together .section-head {
  margin-bottom: 12px;
}

.form-embed {
  overflow: hidden;
  min-height: 400px;
  margin-left: 0;
}

.form-embed iframe {
  width: 100%;
  border: none;
  display: block;
}

/* ---------------- About page ---------------- */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 60px;
  padding-bottom: 90px;
}

.about-section h2 {
  font-size: 34px;
  margin-bottom: 30px;
}

.about-section p {
  font-size: 18px;
  font-weight: 400;
  max-width: 70ch;
  margin-bottom: 25px;
  margin-left: var(--indent);
}

.about-section p:last-child {
  margin-bottom: 0;
}

.edu-item,
.exh-group {
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 8px;
  margin-left: var(--indent);
}

.exh-group {
  margin-bottom: 26px;
}

.exh-group h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.exh-group p {
  font-weight: 400;
  color: var(--gray);
  margin-bottom: 6px;
  margin-left: 0;
}

/* ---------------- Contact page ---------------- */
.contact-intro {
  margin-bottom: 60px;
}

.contact-intro p {
  font-size: 18px;
  margin-left: var(--indent);
}

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--light-gray);
  padding: 30px 0 50px;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer p {
  margin: 0;
  font-size: 15px;
}

.site-footer a.underline,
.contact-intro a,
.about-section a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.social-links {
  display: flex;
  gap: 28px;
}

.social-links a {
  font-size: 15px;
  text-decoration: none;
}

.social-links-mobile {
  display: none;
}

.social-links-mobile img {
  width: 24px;
  height: 24px;
  display: block;
}

/* Generic responsive show/hide helpers (used beyond case-study images) */
.show-mobile {
  display: none;
}

/* ---------------- Case study pages ---------------- */
.case-hero {
  padding-top: 0;
}

.case-hero .kicker {
  color: var(--gray);
  font-size: 16px;
  margin-top: 12px;
  margin-bottom: 32px;
}

.case-hero h1 {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.2;
  max-width: 100%;
  margin-bottom: 0;
}

.case-hero-img {
  overflow: hidden;
  margin: 0 0 60px 0;
  width: 100%;
}

.case-hero-img img {
  width: 100%;
  display: block;
}

.case-section {
  margin-bottom: 24px;
  max-width: 900px;
}

.case-section.full {
  max-width: none;
}

.case-section h2 {
  font-size: 24px;
  margin-bottom: 18px;
}

.case-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
  margin-left: var(--indent);
}

.case-section p {
  font-size: 17px;
  font-weight: 400;
  max-width: 75ch;
  margin-bottom: 18px;
  margin-left: var(--indent);
}

.case-section p:last-child {
  margin-bottom: 0;
}

.case-section p strong,
.about-section p strong,
.contact-intro p strong {
  font-weight: 800;
}

body.illustration-page .case-section p {
  font-weight: 400;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  margin-bottom: 60px;
  margin-left: var(--indent);
  font-size: 17px;
  font-weight: 400;
  color: var(--gray);
}

.case-meta strong {
  color: var(--black);
  font-weight: 800;
}

.case-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 30px 0;
  width: 100%;
}

.case-img img {
  width: 100%;
}

.case-img.square {
  width: 500px;
  height: 500px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.case-img.square img,
.case-img.square video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .case-img.square {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* Item 6: Cats & Balance pages should show images at their natural
   aspect ratio instead of being force-cropped into squares */
body.cats-page .case-img-row .case-img {
  aspect-ratio: auto;
}

body.cats-page .case-img-row .case-img img {
  height: auto;
  object-fit: contain;
}

body.balance-page .case-img.square {
  height: auto;
}

body.balance-page .case-img.square img {
  height: auto;
  object-fit: contain;
}

.case-img.core-entities {
  width: 700px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.case-img-row {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}

body.nexus-page .case-hero-img,
body.nexus-page .case-hero-img img,
body.nexus-page .case-img,
body.nexus-page .case-img img {
  border-radius: 0;
}

body.tap-know-page .case-hero-img,
body.tap-know-page .case-hero-img img,
body.tap-know-page .case-img,
body.tap-know-page .case-img img {
  border-radius: 0;
}

.case-img-row .case-img {
  flex: 1;
  aspect-ratio: 1 / 1;
  margin: 0;
  max-width: none;
  width: auto;
}

.case-img-row .case-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.chronicuddles-page .case-img.design-system-img {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 860px) {
  body.chronicuddles-page .case-img.design-system-img,
  body.chronicuddles-page .case-img.design-system-img img {
    border-radius: 0;
  }
}

.design-system-grid {
  display: flex;
  gap: 60px;
  margin-bottom: 20px;
}

.ds-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.ds-block h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 12px;
}

.ds-block p {
  margin-bottom: 22px;
}

.ds-block img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 50px;
  background: var(--white);
}

.case-quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 60px;
}

.case-quotes blockquote {
  margin: 0;
  background: var(--accent-light);
  border-radius: 14px;
  padding: 22px;
  font-size: 15px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  color: var(--body-color);
}

.case-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 60px;
  background: #000;
}

.responsive-img .show-mobile {
  display: none;
}

@media (max-width: 860px) {
  .responsive-img .show-desktop {
    display: none;
  }

  .responsive-img .show-mobile {
    display: block;
  }
}

.case-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.case-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  border-top: 1px solid var(--light-gray);
  border-bottom: 1px solid var(--light-gray);
  margin-top: 40px;
  margin-bottom: 50px;
  font-size: 16px;
  font-weight: 600;
}

.case-nav a:hover {
  color: var(--accent);
}

@media (max-width: 860px) {
  .case-quotes {
    grid-template-columns: 1fr;
  }

  .case-img-row {
    flex-direction: column;
  }

  .design-system-grid {
    display: block;
  }

  .ds-block {
    margin-bottom: 0;
  }
}


@media (max-width: 860px) {
  :root {
    --side-padding: 24px;
    --indent: 0px;
    --radius: 10px;
  }

  .main-nav {
    position: fixed;
    inset: 0;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 150;
  }

  .main-nav.open {
    transform: translateY(0);
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 34px;
  }

  .main-nav a {
    font-size: 28px;
  }

  .menu-toggle {
    display: flex;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .section-head h2,
  .page-title,
  .about-section h2 {
    font-size: 26px;
  }

  .site-header {
    padding: 35px 0;
  }

  body.home-page .site-header {
    padding: 24px 0;
  }

  .hero-section {
    padding: 0 0 24px;
  }

  .hero-water {
    height: 420px;
  }

  /* Item 3: hide "Explore more" link on mobile */
  .section-head .more-link {
    display: none;
  }

  /* Item 7: halve the other hardcoded corner radii to match --radius */
  .case-quotes blockquote {
    border-radius: 7px;
  }

  .ds-block img {
    border-radius: 6px;
  }

  /* Generic responsive show/hide helpers */
  .show-desktop {
    display: none;
  }

  .show-mobile {
    display: block;
  }

  /* Item 10: footer logo row, centered, mobile only */
  .social-links-mobile.show-mobile {
    display: flex;
    justify-content: center;
    width: 100%;
    gap: 28px;
  }

  .site-footer .container {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-sub {
    font-size: 17px;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
