/* =============================================
   TOKENS — LIGHT MODE (default)
   ============================================= */
:root {
  --bg:           #f7f5f2;
  --bg-surface:   #f0ede8;
  --bg-elevated:  #ffffff;
  --bg-card:      #ffffff;

  --gold:         #b8975a;
  --gold-light:   rgba(184, 151, 90, 0.10);
  --gold-strong:  rgba(184, 151, 90, 0.22);

  --text-primary:   #1a1714;
  --text-secondary: #4a4540;
  --text-muted:     #9a948c;

  --border:       rgba(26, 23, 20, 0.10);
  --border-hover: rgba(184, 151, 90, 0.50);

  --shadow-card:  0 1px 12px rgba(26, 23, 20, 0.07);
  --shadow-hover: 0 8px 36px rgba(26, 23, 20, 0.13);

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;

  --font-body:    'Inter', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-serif:   'DM Serif Display', serif;

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   TOKENS — DARK MODE
   ============================================= */
[data-theme="dark"] {
  --bg:           #111110;
  --bg-surface:   #181715;
  --bg-elevated:  #1e1d1b;
  --bg-card:      #1a1917;

  --gold:         #c9a96e;
  --gold-light:   rgba(201, 169, 110, 0.10);
  --gold-strong:  rgba(201, 169, 110, 0.20);

  --text-primary:   #edeae5;
  --text-secondary: #9a948c;
  --text-muted:     #5a554f;

  --border:       rgba(237, 234, 229, 0.08);
  --border-hover: rgba(201, 169, 110, 0.38);

  --shadow-card:  0 1px 16px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.55);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

/* =============================================
   TYPOGRAPHY HELPERS
   ============================================= */
.section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 0.93rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Section header layout */
.section-header {
  margin-bottom: 3rem;
}

/* Thin divider line accent */
.section-header::after {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--gold);
  margin-top: 1.2rem;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn--primary {
  background: var(--text-primary);
  color: var(--bg);
  border: 1px solid var(--text-primary);
}
.btn--primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  transform: translateY(-1px);
}

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

/* =============================================
   NAV
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: background var(--transition), border-color var(--transition), padding var(--transition);
}
.nav.scrolled {
  background: rgba(247, 245, 242, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 0;
}
[data-theme="dark"] .nav.scrolled {
  background: rgba(17, 17, 16, 0.92);
}

.nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-hover) 30%, var(--border-hover) 70%, transparent);
}

.nav__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.08em;
}

.nav__links {
  display: flex;
  gap: 40px;
}
.nav__links a {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav__links a:hover { color: var(--text-primary); }
.nav__links a:hover::after { width: 100%; }

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.theme-toggle__icon { display: flex; align-items: center; }
.theme-toggle__icon--dark { display: none; }

[data-theme="dark"] .theme-toggle__icon--light { display: none; }
[data-theme="dark"] .theme-toggle__icon--dark  { display: flex; }

/* =============================================
   ABOUT / HERO
   ============================================= */
.about {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 130px 0 90px;
  overflow: hidden;
}

/* Subtle noise texture via gradient */
.about::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(184, 151, 90, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.about__glow { display: none; }

.about__inner {
  display: flex;
  align-items: center;
  gap: 80px;
  position: relative;
  z-index: 1;
}

.about__text { flex: 1; }

.about__greeting {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.about__name {
  font-family: var(--font-serif);
  font-size: clamp(3.4rem, 8vw, 6rem);
  font-weight: 400;
  line-height: 1.0;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.about__name span { color: var(--text-primary); }

.about__role {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 28px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}
.about__role::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.about__bio {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
  margin-bottom: 40px;
  line-height: 1.75;
}

.about__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Profile image */
.about__image-wrap {
  flex-shrink: 0;
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* No spinning ring — replaced with static elegant frame */
.about__image-ring {
  display: none;
}

.about__image-container {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-card);
}

/* Offset frame accent */
.about__image-wrap::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.about__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(8%);
}

.about__image-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.about__image-container--placeholder .about__image-fallback { display: flex; }

.about__scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  opacity: 0.4;
}
.about__scroll-hint span {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--text-primary), transparent);
  border-radius: 1px;
  animation: scrollPulse 2.4s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

/* =============================================
   SECTION DIVIDER
   ============================================= */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* =============================================
   SKILLS
   ============================================= */
.skills {
  padding: 110px 0;
  background: var(--bg-surface);
  position: relative;
}
.skills::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.skill-group:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.skill-group__title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-group__icon { font-size: 0.95rem; }

.skill-group__tags { display: flex; flex-wrap: wrap; gap: 7px; }

.tag {
  padding: 4px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  letter-spacing: 0.02em;
}
[data-theme="dark"] .tag { background: rgba(255,255,255,0.04); }
.tag:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-light);
}

.tag--learning {
  border-color: rgba(184, 151, 90, 0.3);
  color: var(--gold);
  background: var(--gold-light);
}

.skill-group--learning {
  border-color: rgba(184, 151, 90, 0.25);
  background: linear-gradient(135deg, var(--bg-card), var(--gold-light));
}

/* =============================================
   PROJECTS
   ============================================= */
.projects {
  padding: 110px 0;
  background: var(--bg);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Project Card */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-card);
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.project-card__image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-surface);
  position: relative;
}

.project-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s ease;
  filter: grayscale(10%);
}
.project-card:hover .project-card__image-wrap img {
  transform: scale(1.03);
  filter: grayscale(0%);
}

/* Placeholder when no image */
.project-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.project-card__image-placeholder svg { opacity: 0.3; }

/* Image hover overlay — view image */
.project-card__img-hover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(26, 23, 20, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.9s ease;
  cursor: pointer;
}
.project-card__image-wrap:hover .project-card__img-hover { opacity: 0.8; }
.project-card__image-wrap:hover img { filter: blur(2px) grayscale(0%) brightness(0.6); }

/* Clickable text elements */
.project-card__clickable {
  cursor: pointer;
}
.project-card__clickable:hover {
  color: var(--gold);
}

.project-card__body { padding: 22px 24px; flex: 1; display: flex; flex-direction: column; }

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.project-card__tag {
  padding: 2px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid rgba(184, 151, 90, 0.2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.project-card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
}

.project-card__link {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition), color var(--transition);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.project-card:hover .project-card__link {
  gap: 10px;
  color: var(--gold);
}

/* =============================================
   CONTACT
   ============================================= */
.contact {
  padding: 110px 0;
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

.contact__glow { display: none; }

.contact__inner {
  text-align: center;
  position: relative;
  z-index: 1;
}

.contact__sub {
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 3rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.contact__card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  min-width: 240px;
}
.contact__card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.contact__card-icon {
  color: var(--gold);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  opacity: 0.85;
}

.contact__card-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1;
}

.contact__card-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.contact__card-handle {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact__card-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform var(--transition), color var(--transition);
}
.contact__card:hover .contact__card-arrow {
  transform: translateX(4px);
  color: var(--gold);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  padding: 28px 32px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg);
  letter-spacing: 0.06em;
}

/* =============================================
   LIGHTBOX
   ============================================= */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#lightbox.active {
  opacity: 1;
  pointer-events: all;
}

#lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 9, 8, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#lightbox__close {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}
#lightbox__close:hover {
  color: #fff;
}

#lightbox__img-wrap {
  position: relative;
  z-index: 1;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lightbox__img-wrap img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  display: block;
}

#lightbox.active #lightbox__img-wrap {
  animation: lbIn 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes lbIn {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

@media (max-width: 860px) {
  #lightbox__img-wrap { width: 100%; padding: 0 16px; }
}

/* =============================================
   ANIMATIONS / REVEAL
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 860px) {
  .about__inner {
    flex-direction: column-reverse;
    gap: 48px;
    text-align: center;
  }
  .about__role { justify-content: center; }
  .about__role::before { display: none; }
  .about__bio { max-width: 100%; }
  .about__actions { justify-content: center; }
  .about__image-wrap { width: 220px; height: 220px; }
  .about__image-container { width: 200px; height: 200px; border-radius: 50%; }
  .about__image-wrap::after { width: 200px; height: 200px; border-radius: 50%; }

  .projects__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .nav__links { gap: 22px; }
  .skills__grid { grid-template-columns: 1fr; }
  .contact__links { flex-direction: column; align-items: center; }
  .contact__card { width: 100%; max-width: 340px; }
  .container { padding: 0 20px; }
}
