/* ============================================================
   Tom Riat — Personal Page
   Palette: Warm Slate
   ============================================================ */

:root {
  --bg: #FAF8F5;
  --text: #2D3748;
  --text-light: #64748B;
  --accent: #C56B4A;
  --accent-hover: #A8563A;
  --blue: #5B8BA0;
  --section-bg: #F0EDE8;
  --card-bg: #FFFFFF;
  --border: #E2DDD5;
}

/* Dark mode */
[data-theme="dark"] {
  --bg: #1A1D23;
  --text: #E2E8F0;
  --text-light: #94A3B8;
  --accent: #D4845E;
  --accent-hover: #E09570;
  --blue: #7BAFC4;
  --section-bg: #22262E;
  --card-bg: #2A2E36;
  --border: #3A3F4A;
}

[data-theme="dark"] header > nav {
  background: rgba(26, 29, 35, 0.92);
}

/* ============================================================
   Reset & Base
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Navigation
   ============================================================ */

header > nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: -0.5px;
  font-family: 'Inter', monospace;
}

.logo span {
  color: var(--text);
}

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

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

.lang-toggle {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-light);
  transition: border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.lang-toggle:hover {
  border-color: var(--accent);
}

.lang-separator {
  color: var(--border);
}

.lang-option {
  transition: color 0.2s;
}

.lang-option.active {
  color: var(--accent);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197, 107, 74, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-bottom: 0;
}

.hero-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.2rem;
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.hero-text h1 span {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  max-width: 500px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.hero-stat span {
  font-size: 0.8rem;
  color: var(--text-light);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.hero-tags span {
  background: var(--section-bg);
  border: 1px solid var(--border);
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
}

.hero-links {
  display: flex;
  gap: 1rem;
}

.hero-photo-col {
  display: flex;
  justify-content: center;
}

.hero-photo {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08);
  border: 6px solid var(--card-bg);
  transform: scaleX(-1);
}

/* Hero entrance animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scaleX(-1) scale(0.9);
  }
  to {
    opacity: 1;
    transform: scaleX(-1) scale(1);
  }
}

.hero-text {
  animation: fadeInUp 0.8s ease-out both;
}

.hero-photo {
  animation: fadeInScale 0.8s 0.2s ease-out both;
}


/* ============================================================
   Sections
   ============================================================ */

section {
  padding: 5rem 2rem;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-light);
  max-width: 560px;
  margin-bottom: 3rem;
}

/* ============================================================
   Cards — What I Do
   ============================================================ */

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  transition: all 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  border-color: var(--accent);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--accent), #D4845E);
  color: white;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ============================================================
   Journey — Timeline
   ============================================================ */

.journey {
  display: flex;
  flex-direction: column;
  position: relative;
}

.journey::before {
  content: '';
  position: absolute;
  left: 139px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.j-item {
  display: grid;
  grid-template-columns: 120px 40px 1fr;
  align-items: start;
  padding: 1.5rem 0;
}

.j-year {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-align: right;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}

.j-dot-wrap {
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.j-dot {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.j-content {
  min-width: 0;
}

.j-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  cursor: pointer;
  padding-right: 0.5rem;
}

.j-header:hover .j-chevron {
  color: var(--accent);
}

.j-chevron {
  color: var(--text-light);
  transition: all 0.3s;
  flex-shrink: 0;
  margin-top: 2px;
}

.j-item.open .j-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.j-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.j-company {
  font-size: 0.88rem;
  color: var(--blue);
  font-weight: 500;
}

.j-summary {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.4rem;
}

.j-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.j-item.open .j-details {
  max-height: 300px;
  opacity: 1;
  margin-top: 0.8rem;
}

.j-details > p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.j-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.j-tags span {
  background: var(--section-bg);
  border: 1px solid var(--border);
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
}

/* ============================================================
   Project — Wedding Valet
   ============================================================ */

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.project-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #D4845E);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.project-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.project-info > p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.project-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.project-features li {
  font-size: 0.9rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.project-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Project screenshots */
.project-visual {
  display: flex;
  justify-content: center;
}

.project-screenshots {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 300px;
}

.project-img {
  position: absolute;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  object-fit: cover;
}

.project-img-back {
  width: 65%;
  top: 0;
  left: 0;
  z-index: 1;
}

.project-img-front {
  width: 75%;
  bottom: 0;
  right: 0;
  z-index: 2;
}

.project-screenshots:hover .project-img-back {
  transform: translate(-8px, -8px);
}

.project-screenshots:hover .project-img-front {
  transform: translate(8px, 8px);
}

/* ============================================================
   Work with me
   ============================================================ */

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

.collab-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  transition: all 0.25s;
}

.collab-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  border-color: var(--accent);
}

.collab-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  background: var(--section-bg);
  color: var(--accent);
}

.collab-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.collab-card p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ============================================================
   Contact — Channels
   ============================================================ */

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

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.channel-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.channel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  padding: 1.5rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: all 0.25s;
}

.channel-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.channel-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
  background: var(--section-bg);
  color: var(--accent);
  transition: all 0.25s;
}

.channel-card:hover .channel-icon {
  background: var(--accent);
  color: white;
}

.channel-icon-wa {
  background: #E8F5E9;
  color: #25D366;
}

.channel-card:hover .channel-icon-wa {
  background: #25D366;
  color: white;
}

.channel-icon-tg {
  background: #E3F2FD;
  color: #2AABEE;
}

.channel-card:hover .channel-icon-tg {
  background: #2AABEE;
  color: white;
}

.channel-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.channel-detail {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 500;
}

.channel-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  opacity: 0.7;
  font-style: italic;
}

.contact-sub {
  text-align: center;
}

.contact-sub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.contact-sub-link:hover {
  color: var(--accent);
}

/* ============================================================
   Burger Menu (mobile)
   ============================================================ */

.burger {
  display: none !important;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  flex-direction: column;
  gap: 4px;
}

.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ============================================================
   Theme Toggle
   ============================================================ */

.theme-toggle {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem;
  cursor: pointer;
  color: var(--text-light);
  transition: border-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-icon-moon {
  display: none;
}

[data-theme="dark"] .theme-icon-sun {
  display: none;
}

[data-theme="dark"] .theme-icon-moon {
  display: block;
}


/* ============================================================
   Cert Inline (in journey)
   ============================================================ */

.cert-inline {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.cert-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
}

.cert-inline-link:hover {
  color: var(--accent);
}

.cert-inline-link svg {
  color: var(--accent);
  flex-shrink: 0;
}

.cert-inline-date {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* ============================================================
   Collab Stats
   ============================================================ */

.collab-stat {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  font-style: italic;
}

/* ============================================================
   Floating CTA
   ============================================================ */

.floating-cta {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(197, 107, 74, 0.35);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
}

.floating-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.floating-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(197, 107, 74, 0.4);
}

.floating-cta svg {
  flex-shrink: 0;
}

/* ============================================================
   Footer
   ============================================================ */

footer {
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: 0.82rem;
  color: var(--text-light);
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 1.2rem;
}

.footer-social a {
  color: var(--text-light);
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--accent);
}


/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
    padding-top: 6rem;
  }

  .hero-text h1 {
    font-size: 2.4rem;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .hero-meta {
    justify-content: center;
  }

  .hero-tags {
    justify-content: center;
  }

  .hero-links {
    justify-content: center;
  }

  .hero-photo-col {
    order: -1;
  }

  .hero-photo {
    width: 220px;
    height: 220px;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .journey::before {
    left: 19px;
  }

  .j-item {
    grid-template-columns: 1fr;
    padding-left: 40px;
    position: relative;
  }

  .j-year {
    text-align: left;
    font-size: 0.8rem;
  }

  .j-dot-wrap {
    position: absolute;
    left: 0;
    top: 1.5rem;
  }

  .project-card {
    grid-template-columns: 1fr;
    padding: 2rem;
  }

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

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .channel-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-screenshots {
    height: 220px;
  }
}

@media (max-width: 600px) {
  .burger {
    display: flex !important;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 0;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-meta {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

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

  .hero-links {
    flex-direction: column;
    align-items: center;
  }

  .channel-row {
    grid-template-columns: 1fr;
  }

  .floating-cta span {
    display: none;
  }

  .floating-cta {
    padding: 1rem;
    border-radius: 50%;
  }
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }

  .j-details {
    transition: none;
  }

  .hero-text,
  .hero-photo {
    animation: none !important;
  }
}
