/* ═══════════════════════════════════════════
   Phangan Dev — Portfolio
   Dark Tropical aesthetic
   Fonts: Syne (display) + Lora (body)
═══════════════════════════════════════════ */

/* ── Self-hosted Fonts ──────────────────── */
@font-face {
  font-family: 'Syne';
  src: url('fonts/syne-v24-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Syne';
  src: url('fonts/syne-v24-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Syne';
  src: url('fonts/syne-v24-latin-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('fonts/lora-v37-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('fonts/lora-v37-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('fonts/lora-v37-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

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

:root {
  --bg:          #080F0F;
  --surface:     #0E1A1A;
  --card:        #112020;
  --card-hover:  #162828;
  --teal:        #0D9488;
  --teal-light:  #14B8A6;
  --teal-dim:    rgba(13, 148, 136, 0.12);
  --amber:       #F59E0B;
  --amber-light: #FCD34D;
  --text:        #E8F4F4;
  --text-muted:  #7AACAC;
  --border:      rgba(13, 148, 136, 0.18);

  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'Lora', Georgia, serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.4, 0, 1, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.1vw, 18px);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── Typography ─────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }

/* ── Utility ────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px);
}

.section-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
}

.section-title {
  font-size: clamp(32px, 4.5vw, 56px);
  color: var(--text);
  margin-top: 16px;
}

/* ── Scroll Reveal ──────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.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; }

/* ── Buttons ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s var(--ease-out), background 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--teal);
  color: var(--bg);
  box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.5);
}
.btn-primary:hover {
  background: var(--teal-light);
  box-shadow: 0 8px 32px rgba(13, 148, 136, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal-light);
}

.btn-large {
  padding: 18px 40px;
  font-size: 17px;
}

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(8, 15, 15, 0.96);
  border-color: var(--border);
}

.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo — independent fixed layer, not inside header flow */
.logo-fixed {
  position: fixed;
  top: 0;
  left: clamp(12px, 3vw, 40px);
  z-index: 200; /* above header */
  display: block;
  transition: opacity 0.2s, transform 0.2s;
}
.logo-fixed:hover { opacity: 0.88; transform: scale(1.03); }

.logo-img {
  height: 96px;
  width: auto;
  display: block;
}

/* Header only contains nav + lang switcher now — push to right */
.header-inner {
  justify-content: flex-end;
}

/* Right side of header: nav + lang switcher */
.header-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  color: var(--teal) !important;
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: 6px;
  transition: background 0.2s, border-color 0.2s, color 0.2s !important;
}
.nav-cta:hover {
  background: var(--teal-dim);
  border-color: var(--teal) !important;
  color: var(--teal-light) !important;
}

/* ── Language Switcher ──────────────────── */
.lang-switch {
  position: relative;
  flex-shrink: 0;
}

.lang-track {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(14, 26, 26, 0.9);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  gap: 0;
  backdrop-filter: blur(8px);
}

/* The sliding amber pill — sits behind buttons via z-index */
.lang-pill {
  position: absolute;
  top: 4px; left: 4px;
  height: calc(100% - 8px);
  border-radius: 100px;
  background: linear-gradient(135deg, var(--amber) 0%, #E68A00 100%);
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.4);
  transition: transform 0.3s var(--ease-out), width 0.3s var(--ease-out);
  pointer-events: none;
  z-index: 0;
}

.lang-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  background: transparent;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.25s;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
}

.lang-btn.active { color: var(--bg); }

.lang-flag {
  font-size: 15px;
  line-height: 1;
  /* slight lift to align with text */
  position: relative;
  top: -1px;
}

.lang-code { line-height: 1; }

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 150px clamp(24px, 5vw, 80px) 80px;
  overflow: hidden;
}

/* Background gradient mesh */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mesh {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.mesh-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #0D9488 0%, transparent 70%);
  top: -100px; right: -100px;
  animation: float-mesh 12s ease-in-out infinite alternate;
}
.mesh-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #F59E0B 0%, transparent 70%);
  bottom: 50px; left: 5%;
  opacity: 0.15;
  animation: float-mesh 16s ease-in-out infinite alternate-reverse;
}

@keyframes float-mesh {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, -30px) scale(1.08); }
}

/* Orbiting blob — slowly circles the hero title */
.orbit-wrap {
  position: absolute;
  /* centered on the hero content area */
  top: 50%; left: 42%;
  width: 0; height: 0;
  pointer-events: none;
  animation: orbit-spin 28s linear infinite;
}
.orbit-blob {
  position: absolute;
  width: 280px; height: 180px;
  /* amber-orange with a teal tint */
  background: radial-gradient(ellipse at center,
    rgba(245, 158, 11, 0.55) 0%,
    rgba(13, 148, 136, 0.25) 55%,
    transparent 80%
  );
  border-radius: 50%;
  filter: blur(52px);
  /* offset from center so it actually orbits, not spins in place */
  transform: translate(-540px, -120px);
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Noise texture overlay */
.noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  mix-blend-mode: overlay;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}

/* Available badge */
.available-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.3);
  border-radius: 100px;
  padding: 8px 18px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal-light);
  letter-spacing: 0.05em;
  margin-bottom: 48px;
}
.badge-dot {
  width: 8px; height: 8px;
  background: #22C55E;
  border-radius: 50%;
  box-shadow: 0 0 8px #22C55E;
  animation: pulse-dot 2.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #22C55E; }
  50% { opacity: 0.6; box-shadow: 0 0 16px #22C55E; }
}

/* Hero title — asymmetric, oversized */
.hero-title {
  display: flex;
  flex-direction: column;
  font-size: clamp(52px, 8.5vw, 124px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}

.line-1 { color: var(--text); }
.line-2 {
  color: var(--text);
  padding-left: clamp(20px, 5vw, 80px); /* grid-breaking offset */
}
.line-3 {
  color: var(--amber);
  padding-left: clamp(40px, 10vw, 160px); /* even further right */
}

.hero-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 48px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 48px;
  right: clamp(24px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, var(--teal), transparent);
  animation: scroll-grow 2s ease-in-out infinite;
}
@keyframes scroll-grow {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.4; }
}

/* ══════════════════════════════════════════
   SERVICES
══════════════════════════════════════════ */
.services {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--border);
}

/* Carousel wrapper — positions arrows + clips the scroll container */
.services-carousel-wrap {
  position: relative;
}

.services-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  /* hide scrollbar */
  scrollbar-width: none;
  padding-bottom: 4px; /* avoid clipping box-shadows */
}
.services-grid::-webkit-scrollbar { display: none; }

.service-card {
  flex: 0 0 calc(25% - 15px); /* show 4, accounting for gaps */
  scroll-snap-align: start;
  min-width: 220px;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(24px, 3vw, 36px);
  transition: border-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* No running line — amber glow on hover instead */

.service-card:hover {
  border-color: var(--amber);
  box-shadow:
    0 0 32px rgba(245, 158, 11, 0.3),
    0 0 0 1px rgba(245, 158, 11, 0.2);
}

.service-icon {
  color: var(--teal);
  margin-bottom: 20px;
  display: flex;
}

.service-title {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.service-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.service-list li {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.7;
  padding-left: 14px;
  position: relative;
}
.service-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--amber);
  opacity: 0.6;
}

/* Carousel arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  background: rgba(14, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  color: var(--amber);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.3s;
}
.carousel-arrow svg { stroke-width: 2.5; }
.carousel-arrow:hover {
  background: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.5);
  transform: translateY(-50%) scale(1.1);
  color: var(--amber-light);
}
.carousel-arrow.hidden { opacity: 0; pointer-events: none; }

.arrow-left  { left: -26px; }
.arrow-right { right: -26px; }

@media (max-width: 600px) {
  .service-card { flex: 0 0 80vw; }
  .arrow-left  { left: 0; }
  .arrow-right { right: 0; }
}

/* ══════════════════════════════════════════
   ABOUT
══════════════════════════════════════════ */
.about {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 60px;
  align-items: start;
}

.about-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  padding-top: 12px;
}

.about-content .section-title {
  margin-top: 0;
  margin-bottom: 32px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: 600px;
}
.about-text p:last-child { margin-bottom: 0; }

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}
.chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 14px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  transition: border-color 0.2s, color 0.2s;
}
.chip:hover {
  border-color: var(--teal);
  color: var(--teal-light);
}

/* ══════════════════════════════════════════
   PROJECTS
══════════════════════════════════════════ */
.projects {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--border);
}

.section-header {
  margin-bottom: clamp(48px, 7vw, 80px);
}
.section-header .section-label {
  display: block;
  margin-bottom: 8px;
}

/* Asymmetric grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 24px;
}

/* Featured card spans full width */
.card-featured {
  grid-column: 1 / -1;
}

/* ── Card Flip ──────────────────────────── */
.project-card {
  perspective: 1200px;
}

.card-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  transform-style: preserve-3d;
  transition: transform 0.65s var(--ease-out);
}

.project-card:hover .card-flipper {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* Front */
.card-front {
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Flip hint */
.card-flip-hint {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  opacity: 0.4;
  padding: 0 clamp(28px, 4vw, 48px) 20px;
  text-align: right;
}

/* Back — image */
.card-back {
  transform: rotateY(180deg);
  background: var(--surface);
}
.card-back img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: var(--card);
}
.card-back-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 20px 16px;
  background: linear-gradient(to top, rgba(8,15,15,0.95) 0%, transparent 100%);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

/* Featured card — same flip, wider */
.card-featured .card-flipper { min-height: 420px; }
.card-featured .card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 0 60px;
}
.card-featured .card-meta  { grid-column: 1; }
.card-featured .card-title { grid-column: 1; font-size: clamp(36px, 4vw, 56px); margin: 16px 0; }
.card-featured .card-desc  { grid-column: 2; grid-row: 1 / 4; align-self: center; font-size: clamp(15px, 1.2vw, 17px); }
.card-featured .card-stack { grid-column: 1; }
.card-featured .card-links { grid-column: 1; margin-top: 24px; }

/* Project card base */
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.project-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}


.card-inner {
  padding: clamp(28px, 4vw, 48px);
  position: relative;
  z-index: 1;
}

.card-featured .card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 0 60px;
}

/* Featured card layout */
.card-featured .card-meta { grid-column: 1; }
.card-featured .card-title { grid-column: 1; font-size: clamp(36px, 4vw, 56px); margin: 16px 0; }
.card-featured .card-desc { grid-column: 2; grid-row: 1 / 4; align-self: center; font-size: clamp(15px, 1.2vw, 17px); }
.card-featured .card-stack { grid-column: 1; }
.card-featured .card-links { grid-column: 1; margin-top: 24px; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.card-number {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: var(--amber);
  opacity: 0.7;
  letter-spacing: 0.1em;
}
.card-tag {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
}

.card-title {
  font-size: clamp(26px, 2.5vw, 36px);
  color: var(--text);
  margin: 16px 0 20px;
}

.card-desc {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 28px;
}

.card-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}
.card-stack span {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.08em;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.2);
  padding: 4px 10px;
  border-radius: 4px;
}

.card-links { display: flex; gap: 16px; }
.card-link {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s, gap 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-link:hover {
  color: var(--amber-light);
  gap: 10px;
}

/* Decorative circle on featured card */
.card-decoration {
  position: absolute;
  top: -60px; right: -60px;
  pointer-events: none;
}
.deco-circle {
  width: 240px; height: 240px;
  border-radius: 50%;
  border: 1px solid rgba(13, 148, 136, 0.12);
  background: radial-gradient(circle, rgba(13, 148, 136, 0.06) 0%, transparent 70%);
}

/* ══════════════════════════════════════════
   CONTACT
══════════════════════════════════════════ */
.contact {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--border);
}

.contact-inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(48px, 7vw, 96px) clamp(32px, 6vw, 96px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle noise on contact card */
.contact-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
}

.contact-inner .section-label { display: block; margin-bottom: 20px; }

.contact-title {
  font-size: clamp(36px, 5.5vw, 72px);
  color: var(--text);
  margin-bottom: 24px;
}

.contact-sub {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 40px;
  font-size: clamp(15px, 1.2vw, 17px);
}

.contact-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.btn-mail {
  font-size: 14px;
  padding: 12px 24px;
  align-self: center;
}

.contact-note {
  margin-top: 24px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* ══════════════════════════════════════════
   FAQ
══════════════════════════════════════════ */
.faq {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--border);
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  align-items: start; /* columns grow independently */
}

.faq-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.25s;
}
.faq-item[open] {
  border-color: var(--amber);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.12), 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.faq-q {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  min-height: 96px;
  font-family: var(--font-display);
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: var(--amber);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out), color 0.2s;
  line-height: 1;
}
.faq-item[open] .faq-q::after {
  transform: rotate(45deg);
}
.faq-item[open] .faq-q {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.06);
}

.faq-a {
  padding: 0 24px 22px;
  border-top: 1px solid var(--border);
}
.faq-a p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
  padding-top: 18px;
}
.faq-a strong { color: var(--text); font-weight: 600; }

@media (max-width: 760px) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq-col + .faq-col { margin-top: 16px; }
}

/* ══════════════════════════════════════════
   CONTACT MODAL
══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(4, 8, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}
.modal-overlay.open {
  pointer-events: auto;
}
.modal-overlay.visible { opacity: 1; }

.modal-card {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(13, 148, 136, 0.3);
  border-radius: 20px;
  padding: clamp(32px, 5vw, 56px);
  width: 100%;
  max-width: 560px;
  max-height: 90svh;
  overflow-y: auto;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s var(--ease-out);
  scrollbar-width: none;
}
.modal-card::-webkit-scrollbar { display: none; }
.modal-overlay.visible .modal-card {
  transform: scale(1) translateY(0);
}

/* Animated teal→amber border glow */
.modal-border-anim {
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0D9488, #F59E0B, #0D9488);
  background-size: 300% 300%;
  animation: border-shift 4s ease infinite;
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}
@keyframes border-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Soft inner glow */
.modal-glow {
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(13,148,136,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(30px);
}

/* Close button */
.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.modal-close:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(245,158,11,0.08);
}

/* Modal header */
.modal-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 12px;
}
.modal-title {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--text);
  margin-bottom: 32px;
  line-height: 1.1;
}
.modal-title-accent { color: var(--amber); }

/* Honeypot */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

/* Form */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.form-group label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  width: 100%;
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); opacity: 0.5; }

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--teal);
  background: rgba(13,148,136,0.05);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
}
.form-group input.error,
.form-group textarea.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.form-note {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  flex: 1;
  min-width: 0;
}
.form-note.error { color: #EF4444; }
.form-note.success { color: #22C55E; }

.form-submit {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 20px;
  background: var(--surface);
}

/* Brand */
.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 20px;
}
.footer-brand { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.footer-logo-img { height: 48px; width: auto; max-width: 140px; display: block; object-fit: contain; }
.footer-available {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: #22C55E;
  letter-spacing: 0.04em;
}
.footer-time {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.55;
  letter-spacing: 0.05em;
}

/* Nav wrap */
.footer-nav-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.footer-nav-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: center; }
.footer-nav-row a {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-nav-row a:hover { color: var(--text); }

/* Arrow */
/* Pipe - hidden, no animation */
.footer-pipe { display: none; }
.footer-pipe-v { display: none; }
.footer-pipe-h { display: none; }

/* Services row */
.footer-services-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-services-row a {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.65;
  transition: color 0.2s, opacity 0.2s;
}
.footer-services-row a:hover { color: var(--teal-light); opacity: 1; }

/* Bottom */
.footer-bottom { text-align: center; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 8px; }
.footer-copy { font-family: var(--font-display); font-size: 12px; color: var(--text-muted); opacity: 0.5; }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { font-family: var(--font-display); font-size: 12px; color: var(--text-muted); opacity: 0.5; text-decoration: none; transition: opacity 0.2s; }
.footer-legal a:hover { opacity: 1; color: var(--teal); }

@media (max-width: 760px) {
  .footer-main { flex-direction: column; align-items: center; text-align: center; }
  .footer-brand { align-items: center; }
  .footer-nav-row { gap: 16px; }
  .footer-services-row { gap: 14px; }
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .about-label { padding-top: 0; }

  .projects-grid {
    grid-template-columns: 1fr;
  }
  .card-featured { grid-column: 1; }
  .card-featured .card-inner {
    grid-template-columns: 1fr;
  }
  .card-featured .card-desc {
    grid-column: 1;
    grid-row: auto;
  }

  .hero-title { letter-spacing: -0.025em; }
  .line-2 { padding-left: 20px; }
  .line-3 { padding-left: 40px; }

  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 560px) {
  .hero-scroll-hint { display: none; }
  .contact-inner { padding: 40px 24px; }

  /* Hide desktop nav, keep lang switcher but add padding for hamburger */
  .nav-links { display: none; }
  .header-right { padding-right: 52px; }

  /* Fullscreen overlay menu */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(8, 15, 15, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 150;
    align-items: center;
    justify-content: center;
    gap: 36px;
    list-style: none;
  }
  .nav-links.open li { display: flex; }
  .nav-links.open a {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
  }
  .nav-links.open .nav-cta {
    margin-top: 8px;
    padding: 14px 36px;
    font-size: 20px;
    border: 1px solid var(--teal);
    border-radius: 8px;
  }

  /* Hamburger — fixed to right edge, 3 vertical dots */
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(13, 148, 136, 0.15);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    position: fixed;
    top: 18px;
    right: 16px;
    z-index: 160;
  }
  .nav-hamburger span {
    display: block;
    width: 5px;
    height: 5px;
    background: var(--teal-light);
    border-radius: 50%;
    transition: opacity 0.2s, transform 0.3s var(--ease-out);
  }
  .nav-hamburger.open {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--amber);
  }
  .nav-hamburger.open span { background: var(--amber); }
  .nav-hamburger.open span:nth-child(1) { transform: translateY(10px) scale(0.8); opacity: 0.5; }
  .nav-hamburger.open span:nth-child(3) { transform: translateY(-10px) scale(0.8); opacity: 0.5; }
}

@media (min-width: 561px) {
  .nav-hamburger { display: none; }
  .lang-flag { display: none; }
}

/* ══════════════════════════════════════════
   FOCUS / ACCESSIBILITY
══════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ══════════════════════════════════════════
   THAI VISITOR TOAST
══════════════════════════════════════════ */
.th-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  background: var(--card-bg, #0e1a1a);
  border: 1px solid var(--teal, #2dd4bf);
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1.25rem 1.25rem;
  max-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.th-toast.th-toast--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.th-toast-close {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.25rem;
}
.th-toast-close:hover { color: var(--text, #e2e8f0); }
.th-toast-flag { font-size: 1.75rem; line-height: 1; }
.th-toast-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #e2e8f0);
  margin: 0;
  line-height: 1.4;
}
.th-toast-sub {
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
  margin: 0;
  line-height: 1.5;
}
.th-toast-cta {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  width: 100%;
  text-align: center;
}
@media (max-width: 480px) {
  .th-toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}

/* ── Service card learn more link ── */
.service-more {
  display: block;
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--teal, #2dd4bf);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}
.service-more:hover { opacity: 0.7; }

/* ── Contact LinkedIn link ── */
.contact-linkedin {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--teal, #2dd4bf);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}
.contact-linkedin:hover { opacity: 0.7; }
