/* ============================================
   BILGE ERGÜN — Portfolio
   Dark / Cobalt / Minimal
   ============================================ */

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

:root {
  --bg: #0A0A0A;
  --bg-alt: #141414;
  --text: #F0EDE8;
  --text-muted: #A0A0A0;
  --text-dim: #666666;
  --cobalt: #6B8FA3;
  --cobalt-dark: #5A7E92;
  --cobalt-light: #7CA0B4;
  --border: rgba(240, 237, 232, 0.1);
  --border-solid: rgba(240, 237, 232, 0.12);
  --radius-sm: 4px;
  --radius-full: 9999px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Schibsted Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --max-w: 1400px;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s, color 0.4s;
}

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

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

/* --- Utility --- */
.max-w {
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 768px) {
  .max-w {
    padding-left: 48px;
    padding-right: 48px;
  }
}

.flex-1 { flex: 1; }

.accent { color: var(--cobalt); }

.axis-line {
  border-top: 0.5px solid var(--border);
  width: 100%;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all var(--transition-slow);
  background: transparent;
}

.header.scrolled {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .header__inner {
    padding: 0 48px;
  }
}

.header__logo {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
}

.header__nav {
  display: none;
  align-items: center;
  gap: 40px;
}

@media (min-width: 768px) {
  .header__nav {
    display: flex;
  }
}

.header__link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
  padding: 4px;
}

.header__link:hover,
.header__link.active {
  color: var(--text);
}

.header__burger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  border-radius: 4px;
}

@media (min-width: 768px) {
  .header__burger {
    display: none;
  }
}

/* Mobile Nav */
.header__nav.open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  justify-content: center;
  align-items: center;
  gap: 40px;
  z-index: 100;
}

.header__nav.open .header__link {
  font-size: 1.5rem;
  letter-spacing: 0.2em;
}

/* --- Hero --- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero__bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.60);
  backdrop-filter: contrast(1.05);
}

.hero__bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__top {
  position: relative;
  z-index: 10;
  padding: 112px 24px 0;
}

@media (min-width: 768px) {
  .hero__top {
    padding: 144px 48px 0;
  }
}

.hero__mid {
  position: relative;
  z-index: 10;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .hero__mid {
    padding: 0 48px;
  }
}

.hero__mid-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 420px;
}

@media (min-width: 768px) {
  .hero__mid-content {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
  }
}

.hero__bottom {
  position: relative;
  z-index: 10;
  padding: 0 24px 64px;
  text-align: right;
}

@media (min-width: 768px) {
  .hero__bottom {
    padding: 0 48px 80px;
  }
}

.hero__name {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 12vw, 14rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--text);
  user-select: none;
}

.hero__name--accent {
  color: var(--cobalt);
}

.hero__subtitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 4px;
}

.hero__desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(240, 237, 232, 0.65);
  max-width: 400px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cobalt);
}

.hero__scroll-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cobalt);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.hero__scroll svg {
  animation: scrollBounce 2s ease-in-out infinite;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 24px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  min-width: 44px;
  min-height: 44px;
}

.btn--primary {
  background: var(--cobalt);
  color: #F0EDE8;
  border-radius: var(--radius-full);
}

.btn--primary:hover {
  background: var(--cobalt-dark);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(240, 237, 232, 0.3);
  border-radius: var(--radius-full);
}

.btn--outline:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
}

.btn--submit {
  width: 100%;
  background: var(--cobalt);
  color: #F0EDE8;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.btn--submit:hover {
  background: var(--cobalt-dark);
}

/* --- Sections --- */
.section {
  padding: 96px 0;
}

@media (min-width: 768px) {
  .section {
    padding: 144px 0;
  }
}

.section--alt {
  background: var(--bg-alt);
}

.section__header {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .section__header {
    flex-direction: row;
    align-items: flex-end;
    gap: 64px;
  }
}

.section__header-left {
  flex: 1;
}

.section__number-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.section__number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--cobalt);
  white-space: nowrap;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
}

.section__subtitle {
  flex-shrink: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 320px;
}

/* --- Projects Grid --- */
.projects__grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 12;
  gap: 16px;
}

@media (min-width: 768px) {
  .projects__grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
  }
}

.project-card {
  grid-column: span 12;
  cursor: pointer;
}

@media (min-width: 768px) {
  .project-card { grid-column: span 4; }
  .project-card--wide { grid-column: span 8; }
  .project-card--full { grid-column: span 12; }
}

.project-card__image {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s;
}

.project-card:hover .project-card__image img {
  transform: scale(1.03);
  filter: saturate(1) brightness(1);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.project-card:hover .project-card__overlay {
  opacity: 1;
}

.project-card__grid-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='grid' width='40' height='40' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 40 0 L 0 0 0 40' fill='none' stroke='%234A6278' stroke-width='0.5' opacity='0.5'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23grid)'/%3E%3C/svg%3E");
  background-size: 40px 40px;
}

.project-card__arrow-circle {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(107, 143, 163, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F0EDE8;
  transform: scale(0.5);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-card__arrow-circle {
  transform: scale(1);
}

.project-card__badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cobalt);
  color: #F0EDE8;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 44px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

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

.project-card__info {
  padding-top: 16px;
  padding-bottom: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-card__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.02em;
}

.project-card__year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cobalt);
  flex-shrink: 0;
  margin-top: 2px;
}

.project-card__category {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.project-card__desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- About --- */
.about__grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 768px) {
  .about__grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 64px;
  }
}

.about__portrait {
  grid-column: span 12;
}

@media (min-width: 768px) {
  .about__portrait {
    grid-column: span 4;
  }
}

.about__portrait-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  aspect-ratio: 3 / 4;
}

.about__portrait-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__portrait-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.7) 0%, transparent 100%);
}

.about__portrait-name {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #F0EDE8;
}

.about__portrait-role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(240, 237, 232, 0.6);
  margin-top: 2px;
}

.about__content {
  grid-column: span 12;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media (min-width: 768px) {
  .about__content {
    grid-column: span 8;
  }
}

.about__bio p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 640px;
}

.about__bio p + p {
  margin-top: 16px;
}

.about__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 20px;
}

.about__edu-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about__edu-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 12px 0;
  border-top: 0.5px solid var(--border);
}

.about__edu-name {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.about__edu-detail {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.about__edu-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cobalt);
  flex-shrink: 0;
  margin-top: 2px;
}

.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border: 0.5px solid rgba(240, 237, 232, 0.15);
  transition: var(--transition);
  cursor: default;
}

.tag:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
}

/* --- Gallery / Masonry --- */
.gallery__masonry {
  margin-top: 64px;
  columns: 2;
  column-gap: 12px;
}

@media (min-width: 768px) {
  .gallery__masonry {
    columns: 3;
    column-gap: 16px;
  }
}

@media (min-width: 1024px) {
  .gallery__masonry {
    columns: 4;
    column-gap: 16px;
  }
}

.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  break-inside: avoid;
  margin-bottom: 12px;
  cursor: pointer;
}

@media (min-width: 768px) {
  .gallery__item {
    margin-bottom: 16px;
  }
}

.gallery__item img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery__item:hover img {
  transform: scale(1.03);
}

.gallery__caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.65) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery__item:hover .gallery__caption {
  opacity: 1;
}

.gallery__caption span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 237, 232, 0.8);
}

/* --- Contact --- */
.contact__grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
}

@media (min-width: 768px) {
  .contact__grid {
    grid-template-columns: 1fr 1fr;
    gap: 96px;
  }
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contact__header {
  margin-bottom: 0;
}

.contact__name {
  font-family: var(--font-heading);
  font-size: 1.875rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 4px;
}

.contact__role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.contact__time-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: rgba(240, 237, 232, 0.04);
}

.contact__time-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact__time {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
}

.contact__availability {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.contact__avail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.contact__availability span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact__detail-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.contact__detail-value {
  font-size: 0.85rem;
  color: var(--text);
  transition: color var(--transition);
}

.contact__detail-value:hover {
  color: var(--cobalt);
}

.contact__socials {
  display: flex;
  gap: 12px;
}

.contact__social-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(107, 143, 163, 0.3);
  color: var(--cobalt);
  transition: var(--transition);
}

.contact__social-icon:hover {
  border-color: var(--cobalt);
  background: rgba(107, 143, 163, 0.08);
}

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(240, 237, 232, 0.12);
  padding: 8px 0 12px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.form-input::placeholder {
  color: var(--text-dim);
}

.form-input:focus {
  border-bottom-color: var(--cobalt);
}

.form-textarea {
  resize: none;
}

.form-success {
  display: none;
  margin-top: 16px;
  padding: 14px;
  font-size: 0.85rem;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: var(--radius-sm);
  text-align: center;
}

.form-success.show {
  display: block;
}

/* --- Footer --- */
.footer {
  padding: 40px 0;
  border-top: 0.5px solid var(--border);
  background: var(--bg);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer__left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

@media (min-width: 768px) {
  .footer__left {
    flex-direction: row;
    gap: 32px;
    text-align: left;
  }
}

.footer__logo {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer__copy {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.footer__socials {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer__social-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer__social-icon:hover {
  color: var(--cobalt);
}

/* --- Project Modal --- */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 16px;
}

@media (max-width: 768px) {
  .project-modal {
    padding: 0;
  }
}

.project-modal.open {
  opacity: 1;
  visibility: visible;
}

.project-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.project-modal__content {
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 40px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

/* Scrollbar styling */
.project-modal__content::-webkit-scrollbar {
  width: 6px;
}

.project-modal__content::-webkit-scrollbar-track {
  background: transparent;
}

.project-modal__content::-webkit-scrollbar-thumb {
  background: var(--text-dim);
  border-radius: 3px;
}

.project-modal.open .project-modal__content {
  transform: translateY(0);
}

.project-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.project-modal__close:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
}

.project-modal__close:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}

.project-modal__title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.project-modal__subtitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 32px;
}

.project-modal__gallery {
  margin-bottom: 32px;
}

.project-modal__main-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-modal__main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.project-modal__thumbnails {
  display: flex;
  gap: 12px;
}

.project-modal__thumb {
  width: 80px;
  height: 60px;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  padding: 0;
  transition: border-color var(--transition);
  flex-shrink: 0;
}

.project-modal__thumb:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}

.project-modal__thumb.active {
  border-color: var(--cobalt);
}

.project-modal__thumb:hover {
  border-color: var(--cobalt-light);
}

.project-modal__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-modal__description p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* --- Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--left {
  transform: translateX(-30px);
}

.reveal--left.visible {
  transform: translateX(0);
}

.reveal--right {
  transform: translateX(30px);
}

.reveal--right.visible {
  transform: translateX(0);
}

.reveal--up {
  transform: translateY(30px);
}

.reveal--up.visible {
  transform: translateY(0);
}

/* Hero initial reveal */
.reveal-hero {
  opacity: 1;
}

/* Stagger children in grid */
.projects__grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.projects__grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.projects__grid .reveal:nth-child(4) { transition-delay: 0.1s; }
.projects__grid .reveal:nth-child(5) { transition-delay: 0.2s; }
.projects__grid .reveal:nth-child(6) { transition-delay: 0.3s; }

.gallery__masonry .reveal:nth-child(2) { transition-delay: 0.08s; }
.gallery__masonry .reveal:nth-child(3) { transition-delay: 0.16s; }
.gallery__masonry .reveal:nth-child(4) { transition-delay: 0.08s; }
.gallery__masonry .reveal:nth-child(5) { transition-delay: 0.16s; }
.gallery__masonry .reveal:nth-child(6) { transition-delay: 0.24s; }

/* Modal responsive */
@media (max-width: 768px) {
  .project-modal__content {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    max-width: 100%;
    border-radius: 0;
    padding: 56px 16px 16px;
    display: flex;
    flex-direction: column;
  }

  .project-modal__title {
    font-size: 1.4rem;
    padding-right: 40px;
  }

  .project-modal__subtitle {
    font-size: 0.65rem;
    margin-bottom: 16px;
  }

  .project-modal__close {
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
  }

  .project-modal__close svg {
    width: 20px;
    height: 20px;
  }

  .project-modal__gallery {
    flex: 1;
    min-height: 0;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
  }

  .project-modal__main-image {
    flex: 1;
    min-height: 0;
    aspect-ratio: unset;
  }

  .project-modal__thumbnails {
    gap: 8px;
    flex-shrink: 0;
    padding-top: 12px;
  }

  .project-modal__thumb {
    width: 56px;
    height: 42px;
  }

  .project-modal__description {
    flex-shrink: 0;
    overflow-y: auto;
    max-height: 30vh;
  }

  .project-modal__description p {
    font-size: 0.85rem;
    line-height: 1.7;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__scroll svg {
    animation: none;
  }
  .contact__avail-dot {
    animation: none;
  }
}
