/* ============================================================
   SW365 Digital Solutions — Main Stylesheet
   ============================================================ */

/* ─── Custom Properties ───────────────────────────────────── */
:root {
  --bg-0:      #07091b;   /* deepest background */
  --bg-1:      #0b0e22;   /* primary sections */
  --bg-2:      #0e1228;   /* alternate sections */
  --bg-card:   #101530;   /* card background */
  --bg-card-h: #141a3c;   /* card hover */

  --accent-g:  #06d6a0;   /* teal / green  — tech */
  --accent-o:  #f4845f;   /* orange        — fiction */
  --accent-p:  #a78bfa;   /* lavender      — philosophy */

  --text-1:    #eef2f7;
  --text-2:    #94a3b8;
  --text-3:    #475569;

  --border:    rgba(255 255 255 / .07);
  --radius:    12px;
  --radius-sm: 6px;

  --font-ui:   'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-serif:'Playfair Display', Georgia, serif;

  --easing:    cubic-bezier(.16, 1, .3, 1);
  --transition:.28s var(--easing);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-1);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ─── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-1);
}

p { color: var(--text-2); }

/* ─── Utilities ───────────────────────────────────────────── */
.container {
  width: min(1200px, 100% - 3rem);
  margin-inline: auto;
}

.section { padding: 6rem 0; }

.section:nth-child(odd) { background: var(--bg-1); }
.section:nth-child(even){ background: var(--bg-2); }

.section__header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-g);
  margin-bottom: .75rem;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: .75rem;
}

.section__subtitle {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 48ch;
  margin-inline: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  transition: var(--transition);
}

.btn--primary {
  background: var(--accent-g);
  color: var(--bg-0);
}
.btn--primary:hover {
  background: #08e8b0;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(6 214 160 / .35);
}

.btn--ghost {
  background: transparent;
  color: var(--text-1);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--accent-g);
  color: var(--accent-g);
  transform: translateY(-2px);
}

.btn--full { width: 100%; justify-content: center; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }

.tag {
  font-size: .75rem;
  font-weight: 500;
  padding: .3rem .75rem;
  border-radius: 999px;
  background: rgba(255 255 255 / .05);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: var(--transition);
}
.tag--writing { color: var(--accent-g); border-color: rgba(6 214 160 / .3); }
.tag--philo   { color: var(--accent-p); border-color: rgba(167 139 250 / .3); }
.tag--fiction { color: var(--accent-o); border-color: rgba(244 132 95 / .3); }
.tag--photo   { color: #60a5fa;        border-color: rgba(96 165 250 / .3); }
.tag--d365    { color: #f59e0b;        border-color: rgba(245 158 11 / .3); }
.tag--azure   { color: #38bdf8;        border-color: rgba(56 189 248 / .3); }

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: .45rem 1.1rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-g);
  border-color: var(--accent-g);
  color: var(--bg-0);
}

/* Logo shared */
.logo-sw  { font-weight: 800; color: var(--text-1); }
.logo-365 { font-weight: 800; color: var(--accent-g); }

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s var(--easing), transform .7s var(--easing);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Navigation ──────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .3s, box-shadow .3s;
}

.nav--scrolled {
  background: rgba(7 9 27 / .92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--border);
}

.nav__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, 100% - 3rem);
  margin-inline: auto;
  height: 68px;
}

.nav__logo {
  font-size: 1.2rem;
  letter-spacing: -.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color .2s;
}
.nav__link:hover { color: var(--text-1); }

.nav__link--cta {
  padding: .45rem 1.1rem;
  border: 1px solid var(--accent-g);
  border-radius: var(--radius-sm);
  color: var(--accent-g);
}
.nav__link--cta:hover {
  background: var(--accent-g);
  color: var(--bg-0);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-1);
  border-radius: 2px;
  transition: var(--transition);
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-0);
  overflow: hidden;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Radial vignette so text is always readable */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 50%, transparent 40%, var(--bg-0) 100%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 8rem 1.5rem 4rem;
  max-width: 760px;
}

.hero__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-g);
  border: 1px solid rgba(6 214 160 / .35);
  padding: .4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  animation: fadeUp .8s .2s var(--easing) both;
}

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  margin-bottom: 1.5rem;
  animation: fadeUp .8s .35s var(--easing) both;
}

.hero__title-main {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
}

.hero__title-sub {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--text-2);
}

.hero__tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 400;
  color: var(--text-2);
  margin-bottom: 1rem;
  animation: fadeUp .8s .5s var(--easing) both;
}

.hero__typing {
  color: var(--accent-g);
  font-weight: 600;
}

.hero__cursor {
  color: var(--accent-g);
  animation: blink 1s step-end infinite;
}

.hero__desc {
  font-size: 1.05rem;
  color: var(--text-3);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  animation: fadeUp .8s .65s var(--easing) both;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp .8s .8s var(--easing) both;
}

/* Hero domain chips — bottom of section */
.hero__domains {
  position: absolute;
  bottom: 5rem;
  z-index: 2;
  display: flex;
  gap: 1rem;
  animation: fadeUp .8s 1s var(--easing) both;
}

.hero__domain {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  background: rgba(255 255 255 / .04);
  border: 1px solid var(--border);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-2);
  backdrop-filter: blur(8px);
}

.hero__domain-icon { font-size: 1rem; }

/* Scroll hint */
.hero__scroll-hint {
  position: absolute;
  bottom: 1.8rem;
  right: 2.5rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  writing-mode: vertical-lr;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-g), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ─── About ───────────────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: start;
}

.about__lead {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.about__text p { margin-bottom: 1rem; }

.about__skills { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }

.about__skill-group h4 {
  font-size: .8rem;
  font-family: var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: .5rem;
}

.about__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 5rem;
}

.about__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-g), var(--accent-p));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--bg-0);
  margin: 0 auto;
}

.about__stats {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.about__stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-g);
  line-height: 1;
}

.about__stat-label {
  font-size: .72rem;
  font-family: var(--font-mono);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.about__quote {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-2);
  font-size: .95rem;
  line-height: 1.6;
  border-left: 2px solid var(--accent-g);
  padding-left: 1rem;
}

/* ─── Projects ────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-g), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6 214 160 / .25);
  box-shadow: 0 24px 50px rgba(0 0 0 / .5);
}

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

.project-card--featured {
  border-color: rgba(6 214 160 / .2);
  background: linear-gradient(145deg, var(--bg-card), #0d1a30);
}

.project-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card__icon {
  font-size: 1.5rem;
  color: var(--accent-g);
}

.project-card__badge {
  font-family: var(--font-mono);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-g);
  border: 1px solid rgba(6 214 160 / .4);
  padding: .2rem .55rem;
  border-radius: 999px;
}

.project-card__links { display: flex; gap: .75rem; }

.icon-link {
  color: var(--text-3);
  transition: color .2s;
  display: flex;
  align-items: center;
}
.icon-link:hover { color: var(--accent-g); }

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.project-card p {
  font-size: .9rem;
  color: var(--text-2);
  flex: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .25rem;
}

.tech-tags span {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  padding: .25rem .6rem;
  border-radius: var(--radius-sm);
  background: rgba(6 214 160 / .08);
  color: var(--accent-g);
  border: 1px solid rgba(6 214 160 / .2);
}

/* ─── Writing ─────────────────────────────────────────────── */
.writing { background: var(--bg-1); }

.writing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.writing-cat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: border-color var(--transition);
}

.writing-cat--tech   { border-top: 3px solid var(--accent-g); }
.writing-cat--philo  { border-top: 3px solid var(--accent-p); }
.writing-cat--fiction{ border-top: 3px solid var(--accent-o); }

.writing-cat__header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.writing-cat__icon {
  font-size: 1.5rem;
  margin-top: .15rem;
  flex-shrink: 0;
}

.writing-cat--tech   .writing-cat__icon { color: var(--accent-g); }
.writing-cat--philo  .writing-cat__icon { color: var(--accent-p); }
.writing-cat--fiction .writing-cat__icon{ color: var(--accent-o); }

.writing-cat__header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.writing-cat__header p {
  font-size: .83rem;
  color: var(--text-3);
}

.writing-posts {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.writing-post {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.writing-post:last-child { border-bottom: none; padding-bottom: 0; }

.writing-post__date {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .08em;
  display: block;
  margin-bottom: .35rem;
}

.writing-post h4 {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: .4rem;
  line-height: 1.4;
}

.writing-cat--tech   .writing-post h4 a:hover { color: var(--accent-g); }
.writing-cat--philo  .writing-post h4 a:hover { color: var(--accent-p); }
.writing-cat--fiction .writing-post h4 a:hover { color: var(--accent-o); }

.writing-post h4 a { transition: color .2s; }

.writing-post p {
  font-size: .83rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: .5rem;
}

.writing-post__meta {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--text-3);
}

.writing-cat__more {
  font-size: .85rem;
  font-weight: 600;
  transition: opacity .2s, color .2s;
  opacity: .7;
}
.writing-cat--tech    .writing-cat__more { color: var(--accent-g); }
.writing-cat--philo   .writing-cat__more { color: var(--accent-p); }
.writing-cat--fiction .writing-cat__more { color: var(--accent-o); }
.writing-cat__more:hover { opacity: 1; }

/* ─── Photography ─────────────────────────────────────────── */
.photography { background: var(--bg-2); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: 10px;
  grid-auto-flow: dense;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--bg-card);
}

.photo-item--tall { grid-row: span 2; }
.photo-item--wide { grid-column: span 2; }

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--easing);
}

.photo-item:hover img { transform: scale(1.06); }

.photo-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7 9 27 / .85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem 1.1rem;
  opacity: 0;
  transition: opacity .3s;
}

.photo-item:hover .photo-item__overlay { opacity: 1; }

.photo-item__title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-1);
  display: block;
}

.photo-item__meta {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--text-2);
  display: block;
  margin-top: .2rem;
}

/* Filtered out state */
.photo-item.filtered-out,
.project-card.filtered-out {
  display: none;
}

/* ─── Contact ─────────────────────────────────────────────── */
.contact { background: var(--bg-1); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.contact-info__intro {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-info__links {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: .9rem;
  transition: var(--transition);
}

.contact-link:hover {
  border-color: var(--accent-g);
  color: var(--accent-g);
  transform: translateX(4px);
}

.contact-link__icon {
  width: 28px;
  text-align: center;
  font-size: .9rem;
  color: var(--text-3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.form-group label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .03em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  font: inherit;
  font-size: .9rem;
  color: var(--text-1);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-group select option { background: var(--bg-card); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-g);
  box-shadow: 0 0 0 3px rgba(6 214 160 / .12);
}

.form-success {
  text-align: center;
  color: var(--accent-g);
  font-size: .9rem;
  padding: .75rem;
  border: 1px solid rgba(6 214 160 / .3);
  border-radius: var(--radius-sm);
}

/* ─── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--bg-0);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.footer__brand .logo-sw,
.footer__brand .logo-365 { font-size: 1.3rem; }

.footer__brand p {
  font-size: .85rem;
  color: var(--text-3);
  margin-top: .25rem;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.footer__nav a {
  font-size: .85rem;
  color: var(--text-3);
  transition: color .2s;
}
.footer__nav a:hover { color: var(--accent-g); }

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

.footer__bottom p { font-size: .8rem; color: var(--text-3); }

/* ─── Lightbox ────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(7 9 27 / .96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.lightbox:not([hidden]) {
  opacity: 1;
  pointer-events: all;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.lightbox__close:hover {
  border-color: var(--accent-g);
  color: var(--accent-g);
}

.lightbox__inner {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.lightbox__inner img {
  max-height: 80vh;
  border-radius: var(--radius);
  margin: 0 auto;
  box-shadow: 0 32px 80px rgba(0 0 0 / .7);
}

.lightbox__caption {
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--text-2);
}

/* ─── Keyframes ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes scrollPulse {
  0%, 100% { opacity: .4; }
  50%       { opacity: 1; }
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .writing-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin-inline: auto;
  }

  .about__grid {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin-inline: auto;
  }

  .about__card { position: static; }
}

@media (max-width: 768px) {
  .section { padding: 4.5rem 0; }

  /* Nav */
  .nav__links {
    position: fixed;
    top: 68px;
    left: 0; right: 0;
    background: rgba(7 9 27 / .97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform .35s var(--easing);
    pointer-events: none;
  }

  .nav__links.open {
    transform: translateY(0);
    pointer-events: all;
  }

  .nav__links li { width: 100%; }

  .nav__link {
    display: block;
    padding: .85rem 2rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }

  .nav__link--cta {
    border: none;
    margin: .5rem 2rem;
    width: auto;
  }

  .nav__hamburger { display: flex; }

  /* Hero */
  .hero__domains { gap: .5rem; }
  .hero__domain  { font-size: .75rem; padding: .4rem .75rem; }
  .hero__scroll-hint { display: none; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; }

  /* Photo grid */
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
  .photo-item--wide { grid-column: span 2; }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Footer */
  .footer__top { flex-direction: column; }
  .footer__bottom { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 480px) {
  .photo-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }
  .photo-item--tall,
  .photo-item--wide { grid-column: unset; grid-row: unset; }

  .hero__domains { flex-wrap: wrap; justify-content: center; }
}
