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

:root {
  --bg:        #1a1a1a;
  --bg2:       #232323;
  --bg3:       #2c2c2c;
  --bg4:       #333333;
  --card:      #1e1e1e;
  --card2:     #272727;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.14);
  --text:      #f0f0f0;
  --muted:     #888;
  --muted2:    #aaa;
  --accent:    #ffffff;
  --tag-bg:    #3a3a3a;
  --tag-text:  #ccc;
  --font:      'Sora', sans-serif;
  --mono:      'DM Mono', monospace;
  --radius:    10px;
  --radius-lg: 14px;
}

/* ─── Light mode overrides ─── */
body.light {
  --bg:        #f5f5f3;
  --bg2:       #ebebea;
  --bg3:       #e0e0de;
  --bg4:       #d4d4d2;
  --card:      #f0f0ee;
  --card2:     #e8e8e6;
  --border:    rgba(0,0,0,0.08);
  --border2:   rgba(0,0,0,0.16);
  --text:      #1a1a1a;
  --muted:     #777;
  --muted2:    #555;
  --accent:    #000000;
  --tag-bg:    #dcdcda;
  --tag-text:  #444;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  padding: 0;
}

/* ─── Page wrapper ─── */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 88px 40px 0;
}

/* ─── Page title ─── */
.page-title {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 40px;
}

/* ─── Hero row ─── */
.hero {
  text-align: center;
  margin-bottom: 32px;
}

.hero-content { padding-top: 0; }

.hero-content h2 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.hero-content p {
  color: var(--muted2);
  font-size: 14.5px;
  line-height: 1.75;
  margin-bottom: 14px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--muted2);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
  margin-top: 8px;
}
.btn:hover { background: var(--bg3); color: var(--text); border-color: var(--border2); }

.btn-icon { font-size: 18px; opacity: 0.7; }

/* ─── Section wrapper ─── */
.section { margin-bottom: 64px; }

/* ─── Filter tabs ─── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.filter-btn.active {
  background: var(--bg4);
  color: var(--text);
}
.filter-btn:hover:not(.active) { color: var(--muted2); }

.filter-icon { font-size: 13px; opacity: 0.7; }

/* ─── Skills grid ─── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.skill-card:hover { border-color: var(--border2); transform: translateY(-2px); }

.skill-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.skill-thumb svg { width: 60%; height: 60%; opacity: 0.9; }

.skill-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.skill-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  border-top: 1px solid var(--border);
}

.skill-label-icon { opacity: 0.55; font-size: 13px; }

/* ─── Work gallery ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.work-section {
  background: var(--bg2);
  border-radius: var(--radius-lg);
  padding: 28px 28px 32px;
  margin-bottom: 40px;
}

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


/* ── Album-style work cards ── */
.work-card {
  background: var(--bg3);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
.work-card:hover { opacity: 0.88; transform: translateY(-2px); }

.work-card-thumb {
  width: 100%;
  aspect-ratio: 21/14;
  overflow: hidden;
  position: relative;
  background: var(--bg4);
}

/* Image fills the thumb but is scaled up slightly so it always covers,
   even if the source file is square. object-position centres the crop. */
.work-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.08);
  transition: transform 0.3s ease;
}
.work-card:hover .work-card-thumb img { transform: scale(1.13); }

/* Title overlays the image, hidden by default, fades in on hover */
.work-card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 14px 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.3;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  font-family: var(--mono);
  pointer-events: none;
}
.work-card:hover .work-card-title {
  opacity: 1;
  transform: translateY(0);
}



/* ─── Featured projects ─── */
.featured-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: flex-start;
}


.featured-sidebar h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
}

.featured-sidebar p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.project-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.project-card:hover { border-color: var(--border2); transform: translateY(-2px); }

.project-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.project-body { padding: 14px 16px 16px; }

.project-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 6px;
}

.project-desc {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid var(--border);
}



/* ─── Services ─── */
.services-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: flex-start;
}

.services-sidebar h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
}
.services-sidebar p { font-size: 13.5px; color: var(--muted); line-height: 1.65; margin-bottom: 20px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: var(--bg2);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.service-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.service-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.service-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.35;
}

.service-body { font-size: 13px; color: var(--muted2); line-height: 1.7; margin-bottom: 14px; }

.service-price {
  font-size: 13px;
  font-style: italic;
  color: var(--muted2);
  margin-bottom: 10px;
}
.service-price strong { font-style: normal; font-weight: 500; color: var(--muted2); }

.service-features {
  font-size: 13px;
  font-style: italic;
  color: var(--muted2);
  margin-bottom: 8px;
}

.service-list {
  list-style: disc;
  list-style-position: inside;
  font-size: 13px;
  color: var(--muted2);
  line-height: 1.8;
}

/* ─── Divider ─── */
.divider { height: 1px; background: var(--border); margin: 48px 0; }

/* ─── Photos grid ─── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.photo-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}
.photo-card:hover { opacity: 0.88; transform: translateY(-2px); }

.photo-card-thumb {
  width: 100%;
  aspect-ratio: 16/16;
  overflow: hidden;
  background: var(--bg4);
}

.photo-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.08);
  transition: transform 0.3s ease;
}
.photo-card:hover .photo-card-thumb img { transform: scale(1.13); }



/* ─── Sticky nav ─── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.site-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 3px;
  font-size: 13.5px;
  padding: 5px 10px;
  border-radius: 6px;
}
.nav-link:hover {
  color: var(--text);
  background: var(--bg3);
}

/* ─── Theme toggle (inside nav) ─── */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--muted2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  position: absolute;
  left: 93%
}
.theme-toggle:hover {
  background: var(--bg3);
  color: var(--text);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  position: absolute;
  transition: opacity 0.2s, transform 0.2s;
}

/* Dark mode: show moon, hide sun */
.theme-toggle .icon-moon { opacity: 1; transform: scale(1); }
.theme-toggle .icon-sun  { opacity: 0; transform: scale(0.6); }

/* Light mode: show sun, hide moon */
body.light .theme-toggle .icon-moon { opacity: 0; transform: scale(0.6); }
body.light .theme-toggle .icon-sun  { opacity: 1; transform: scale(1); }



/* ─── Social bar ─── */
.social-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.social-link:hover {
  color: var(--text);
  border-color: var(--border2);
  background: var(--bg3);
}

.social-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.articles-heading {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.articles-list {
  display: flex;
  flex-direction: column;
}

.article-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
}
.articles-list .article-row:first-child {
  border-top: 1px solid var(--border);
}
.article-row:hover .article-publication,
.article-row:hover .article-subtitle {
  color: var(--text);
}

.article-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.article-publication {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted2);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.12s;
  line-height: 1.4;
}

.article-subtitle {
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.12s;
  line-height: 1.4;
}

.article-date {
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}



/* ─── Music modal ─── */
.music-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.music-modal-overlay.open { display: flex; }

.music-modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.music-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}
.music-modal-close:hover { color: var(--text); }

.music-modal-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
  font-family: var(--mono);
  text-transform: uppercase;
  text-align: center;
  width: 100%;
}

/* Spotify embed */
.music-modal-embed iframe {
  width: 100%;
  height: 152px;
  border-radius: var(--radius);
  border: none;
  display: block;
}

/* Streaming links — centered row, one pill each */
.music-modal-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stream-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--muted2);
  text-decoration: none;
  font-size: 13px;
  font-family: var(--font);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.stream-btn:hover {
  color: var(--text);
  border-color: var(--border2);
  background: var(--bg4);
}
.stream-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ─── Footer ─── */
.site-footer {
  text-align: center;
  padding: 0px 20px 32px;
  font-size: 12.5px;
  color: var(--muted);
  font-family: var(--mono);
}

/* ─── Playlist grid ─── */
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.playlist-embed {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.playlist-embed iframe {
  display: block;
  width: 100%;
  height: 450px;
  border: none;
}

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

@media (max-width: 900px) { .skills-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .featured-layout { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .featured-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .services-layout { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .services-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .playlist-grid { grid-template-columns: 1fr; }
}

/* ─── Responsive hero ─── */
@media (max-width: 700px) {
  .page { padding: 88px 20px 0; }
  .page-title { font-size: 28px; }
  .site-nav-inner { padding: 0 12px; }
  .nav-link { padding: 5px 6px; letter-spacing: -0.1em; }
  .theme-toggle { width: 32px; height: 32px; left: 88% }
}

@media (max-width: 700px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }


/* ─── Scroll offset for fixed nav ─── */
#music,
#playlists,
#articles,
#services {
  scroll-margin-top: 64px;
}
