/* ---------------------------------------- */
/* CSS VARIABLES — DARK (default) & LIGHT   */
/* ---------------------------------------- */

:root {
  --bg:          #070707;
  --bg-nav:      rgba(7, 7, 7, 0.92);
  --bg-card:     rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-input:    rgba(255, 255, 255, 0.05);
  --border:      rgba(255, 255, 255, 0.10);
  --border-nav:  rgba(255, 255, 255, 0.12);
  --border-form: rgba(255, 255, 255, 0.12);
  --border-form-focus: rgba(255, 255, 255, 0.4);
  --text-primary:  #ffffff;
  --text-secondary: #d6d6d6;
  --text-muted:   #888888;
  --text-faint:   #555555;
  --text-loc:     #e1e1e1;
  --brand-border: #ffffff;
  --brand-dot:    #ffffff;
  --tagline-border: rgba(255, 255, 255, 0.22);
  --tagline-bg:   rgba(255, 255, 255, 0.04);
  --button-border: #ffffff;
  --button-color:  #ffffff;
  --button-hover-bg: rgba(255, 255, 255, 0.08);
  --footer-border: rgba(255, 255, 255, 0.07);
  --photo-border: rgba(255, 255, 255, 0.16);
  --photo-bg: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  --link-border: rgba(255, 255, 255, 0.08);
  --link-icon-border: rgba(255, 255, 255, 0.2);
  --placeholder: #555555;
  --success: #7fff9a;
  --tag-border: rgba(255, 255, 255, 0.2);
  --tag-color: #aaaaaa;
  --preview-border: rgba(255, 255, 255, 0.1);
  --toggle-bg: rgba(255,255,255,0.08);
  --toggle-border: rgba(255,255,255,0.25);
}

body.light-mode {
  --bg:          #f5f0e8;
  --bg-nav:      rgba(245, 240, 232, 0.92);
  --bg-card:     rgba(0, 0, 0, 0.025);
  --bg-card-hover: rgba(0, 0, 0, 0.05);
  --bg-input:    rgba(0, 0, 0, 0.04);
  --border:      rgba(0, 0, 0, 0.10);
  --border-nav:  rgba(0, 0, 0, 0.08);
  --border-form: rgba(0, 0, 0, 0.12);
  --border-form-focus: rgba(0, 0, 0, 0.4);
  --text-primary:  #0f0f0f;
  --text-secondary: #333333;
  --text-muted:   #777777;
  --text-faint:   #999999;
  --text-loc:     #444444;
  --brand-border: #0f0f0f;
  --brand-dot:    #0f0f0f;
  --tagline-border: rgba(0, 0, 0, 0.18);
  --tagline-bg:   rgba(0, 0, 0, 0.03);
  --button-border: #0f0f0f;
  --button-color:  #0f0f0f;
  --button-hover-bg: rgba(0, 0, 0, 0.06);
  --footer-border: rgba(0, 0, 0, 0.09);
  --photo-border: rgba(0, 0, 0, 0.12);
  --photo-bg: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.01));
  --link-border: rgba(0, 0, 0, 0.08);
  --link-icon-border: rgba(0, 0, 0, 0.18);
  --placeholder: #aaaaaa;
  --success: #1a7a30;
  --tag-border: rgba(0, 0, 0, 0.18);
  --tag-color: #666666;
  --preview-border: rgba(0, 0, 0, 0.1);
  --toggle-bg: rgba(0,0,0,0.06);
  --toggle-border: rgba(0,0,0,0.22);
}

/* ---------------------------------------- */
/* SCROLL ANIMATION BASE                    */
/* ---------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------------------------------------- */
/* BASE                                     */
/* ---------------------------------------- */

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-primary);
  font-family: "Josefin Sans", sans-serif;
  transition: background 0.35s ease, color 0.35s ease;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

section {
  min-height: 100vh;
  display: grid;
  padding: 32px 32px 40px;
}

/* ---------------------------------------- */
/* HERO                                     */
/* ---------------------------------------- */

.hero {
  grid-template-rows: auto 1fr;
  justify-items: center;
  text-align: center;
}

.hero__content {
  display: grid;
  align-items: center;
  justify-items: center;
}

/* ---------------------------------------- */
/* TOP BAR                                  */
/* ---------------------------------------- */

.top-bar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 24px 0;
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 20;
  transition: background 0.35s ease;
}

.location {
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  color: var(--text-loc);
  text-transform: uppercase;
  transition: color 0.35s ease;
}

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

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.85;
}

.nav-link:hover {
  opacity: 1;
}

/* ---------------------------------------- */
/* BRAND MARK                               */
/* ---------------------------------------- */

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}
.brand-mark span {
  position: absolute;
  display: block;
  border: 2px solid var(--brand-border);
  border-radius: 50%;
  transition: border-color 0.35s ease;
}
.brand-mark span:nth-child(1) { inset: 0; }
.brand-mark span:nth-child(2) { inset: 10px; opacity: 0.6; }
.brand-mark span:nth-child(3) {
  width: 14px;
  height: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: none;
  background: var(--brand-dot);
  transition: background 0.35s ease;
}
.brand-mark span:nth-child(4) {
  inset: 0;
  border: none;
  box-shadow: 0 0 0 6px rgba(128, 128, 128, 0.1);
}

/* ---------------------------------------- */
/* THEME TOGGLE                             */
/* ---------------------------------------- */

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--toggle-border);
  background: var(--toggle-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  flex-shrink: 0;
  color: var(--text-primary);
}

.theme-toggle:hover {
  transform: rotate(20deg) scale(1.08);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.25s ease;
}

/* show sun in dark, moon in light */
.icon-sun  { display: block; }
.icon-moon { display: none; }
body.light-mode .icon-sun  { display: none; }
body.light-mode .icon-moon { display: block; }

/* ---------------------------------------- */
/* HERO CONTENT                             */
/* ---------------------------------------- */

.hero__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Hero entrance animation */
.hero__intro h1 {
  margin: 0;
  font-family: "Changa One", cursive;
  font-size: clamp(3.8rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  animation: heroSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__intro h1:nth-of-type(2) {
  animation-delay: 0.12s;
}

@keyframes heroSlideUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__tagline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.6rem;
  border: 1px solid var(--tagline-border);
  border-radius: 14px;
  background: var(--tagline-bg);
  animation: heroSlideUp 0.8s 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: border-color 0.35s ease, background 0.35s ease;
}
.hero__tagline span {
  font-size: 0.98rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  transition: color 0.35s ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.8rem;
  border: 2px solid var(--button-border);
  border-radius: 10px;
  color: var(--button-color);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  font-family: "Josefin Sans", sans-serif;
  transition: transform 0.2s ease, background 0.2s ease,
              color 0.35s ease, border-color 0.35s ease;
  animation: heroSlideUp 0.8s 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.button:hover {
  background: var(--button-hover-bg);
  transform: translateY(-2px);
}

/* Hero CTA — flip colours + grow on hover */
.hero__intro .button:hover {
  background: var(--button-color);
  color: var(--bg);
  transform: translateY(-2px) scale(1.07);
  border-color: var(--button-color);
}

/* ---------------------------------------- */
/* ABOUT                                    */
/* ---------------------------------------- */

.about {
  padding-top: 0;
}

.about__body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.about__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.about__copy .lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.35s ease;
}
.about__copy p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-secondary);
  transition: color 0.35s ease;
}

.about__card {
  display: flex;
  justify-content: center;
}

.photo-frame {
  width: 100%;
  max-width: 460px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--photo-border);
  background: var(--photo-bg);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.25);
  transition: border-color 0.35s ease, transform 0.4s ease, box-shadow 0.4s ease;
}
.photo-frame:hover {
  transform: translateY(-6px);
  box-shadow: 0 44px 100px rgba(0, 0, 0, 0.32);
}
.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ---------------------------------------- */
/* PROJECTS                                 */
/* ---------------------------------------- */

.projects {
  min-height: auto;
  padding: 80px 32px;
}

.projects__body {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.projects__heading {
  font-family: "Changa One", cursive;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
  color: var(--text-primary);
  transition: color 0.35s ease;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  transition: background 0.3s ease, border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.project-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.project-card__info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-label {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  transition: color 0.35s ease;
}

.project-title {
  font-family: "Changa One", cursive;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: 0.05em;
  margin: 0;
  text-transform: uppercase;
  color: var(--text-primary);
  transition: color 0.35s ease;
}

.project-desc {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0;
  transition: color 0.35s ease;
}

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

.project-tags span {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--tag-border);
  border-radius: 6px;
  color: var(--tag-color);
  transition: border-color 0.35s ease, color 0.35s ease;
}

.project-card__preview {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--preview-border);
  transition: border-color 0.35s ease;
}

.project-card__preview img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

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

/* ---------------------------------------- */
/* CONTACT                                  */
/* ---------------------------------------- */

.contact {
  padding: 80px 32px;
  min-height: 100vh;
  display: grid;
  align-content: center;
}

.contact__body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.contact__heading {
  font-family: "Changa One", cursive;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  color: var(--text-primary);
  transition: color 0.35s ease;
}

.contact__sub {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0 0 2.5rem;
  max-width: 360px;
  transition: color 0.35s ease;
}

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

.contact__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--link-border);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.contact__link:hover {
  color: var(--text-primary);
  padding-left: 6px;
}

.contact__link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--link-icon-border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text-primary);
  transition: border-color 0.35s ease, color 0.35s ease;
}

/* ---------------------------------------- */
/* FORM                                     */
/* ---------------------------------------- */

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.35s ease;
}

.form-group input,
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-form);
  border-radius: 10px;
  padding: 14px 18px;
  color: var(--text-primary);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.35s ease, color 0.35s ease;
  resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--placeholder);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--border-form-focus);
}

.contact__submit {
  align-self: flex-start;
}

.form-success {
  display: none;
  font-size: 0.88rem;
  color: var(--success);
  letter-spacing: 0.08em;
  margin: 0;
}

/* ---------------------------------------- */
/* FOOTER                                   */
/* ---------------------------------------- */

.footer {
  padding: 32px;
  border-top: 1px solid var(--footer-border);
  text-align: center;
  transition: border-color 0.35s ease;
}

.footer p {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0;
  transition: color 0.35s ease;
}

/* ---------------------------------------- */
/* RESPONSIVE — TABLET                      */
/* ---------------------------------------- */

@media (max-width: 980px) {
  .about__body {
    grid-template-columns: 1fr;
  }
  .project-card {
    grid-template-columns: 1fr;
  }
  .project-card__preview {
    order: -1;
  }
  .contact__body {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .contact__sub {
    max-width: 100%;
  }
}

/* ---------------------------------------- */
/* RESPONSIVE — MOBILE                      */
/* ---------------------------------------- */

@media (max-width: 680px) {
  section {
    padding: 24px 18px;
  }

  .projects,
  .contact {
    padding: 60px 18px;
  }

  .project-card {
    padding: 24px;
    gap: 24px;
  }

  /* Top bar: stack neatly */
  .top-bar {
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 0;
  }

  /* On mobile: location hidden to save space */
  .location {
    display: none;
  }

  /* Nav takes full width, toggle stays in its own row on right */
  .nav-links {
    flex-wrap: wrap;
    gap: 16px;
    order: 2;
    width: 100%;
  }

  .top-bar-right {
    order: 1;
    margin-left: auto;
  }

  /* Hero */
  .hero__intro {
    gap: 16px;
  }
  .hero__intro h1 {
    font-size: clamp(3rem, 13vw, 5rem);
  }
  .hero__tagline {
    width: 100%;
    text-align: center;
  }
  .hero__tagline span {
    font-size: 0.88rem;
  }
  .button {
    width: 100%;
  }

  /* About */
  .photo-frame {
    max-width: 340px;
  }

  /* Project preview image shorter on mobile */
  .project-card__preview img {
    height: 200px;
  }

  /* Contact */
  .contact__heading {
    font-size: clamp(2rem, 10vw, 3rem);
  }
  .contact__submit {
    width: 100%;
  }

  /* Tighten form */
  .contact__form {
    gap: 16px;
  }
}

@media (max-width: 420px) {
  .hero__intro h1 {
    font-size: clamp(2.6rem, 15vw, 4rem);
  }
  .project-card {
    padding: 18px;
  }
}