/*
Theme Name: Digital Visibility
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A premium, luxury-minimal WordPress theme built for a personal digital marketing & SEO consultant portfolio. Dark/light design system, custom Projects post type with case studies, and a lightweight scroll & reveal animation system built with vanilla JS and Intersection Observer.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dmportfolio
*/

/* =========================================================
   0. RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   1. DESIGN TOKENS
   ========================================================= */
:root {
  /* -- dark (default) -- */
  --color-bg: #0a0a0b;
  --color-bg-alt: #131316;
  --color-bg-raised: #17171b;
  --color-text: #f5f5f2;
  --color-text-muted: #a1a1aa;
  --color-border: #232327;
  --color-accent: #c9a667;
  --color-accent-strong: #e0c088;
  --color-accent-soft: rgba(201, 166, 103, 0.12);
  --color-overlay: rgba(10, 10, 11, 0.86);

  --font-sans: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container-w: 1240px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5.5rem;
  --space-2xl: 8rem;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.32);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-base: 320ms;
  --dur-slow: 600ms;

  --header-h: 84px;
}

:root:not([data-theme="light"]) { color-scheme: dark; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --color-bg: #faf9f6;
    --color-bg-alt: #f1efe9;
    --color-bg-raised: #ffffff;
    --color-text: #15151a;
    --color-text-muted: #5c5c66;
    --color-border: #e5e2d9;
    --color-accent: #a8823f;
    --color-accent-strong: #8a6a2f;
    --color-accent-soft: rgba(168, 130, 63, 0.1);
    --color-overlay: rgba(250, 249, 246, 0.88);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --color-bg: #faf9f6;
  --color-bg-alt: #f1efe9;
  --color-bg-raised: #ffffff;
  --color-text: #15151a;
  --color-text-muted: #5c5c66;
  --color-border: #e5e2d9;
  --color-accent: #a8823f;
  --color-accent-strong: #8a6a2f;
  --color-accent-soft: rgba(168, 130, 63, 0.1);
  --color-overlay: rgba(250, 249, 246, 0.88);
  color-scheme: light;
}

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

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

section { padding-block: var(--space-2xl); position: relative; }
@media (max-width: 768px) { section { padding-block: var(--space-xl); } }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h2.section-title { font-size: clamp(1.9rem, 3.4vw, 2.75rem); margin-bottom: var(--space-xs); }
p.section-lede { color: var(--color-text-muted); max-width: 640px; font-size: 1.05rem; }
.section-head { margin-bottom: var(--space-lg); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--color-accent); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--color-accent); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--color-accent); color: #0a0a0b; padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* =========================================================
   2. BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 1.6rem; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600; border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:hover svg.icon-arrow { transform: translateX(3px); }

.btn-primary { background: var(--color-accent); color: #0a0a0b; }
.btn-primary:hover { background: var(--color-accent-strong); box-shadow: var(--shadow-sm); }

.btn-outline { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

.btn-ghost { background: transparent; color: var(--color-text-muted); padding: 0.6rem 0.9rem; }
.btn-ghost:hover { color: var(--color-accent); }

.btn-block { width: 100%; justify-content: center; }

/* =========================================================
   3. SCROLL PROGRESS
   ========================================================= */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: var(--color-accent); transform: scaleX(0); transform-origin: 0 0;
  z-index: 1200; will-change: transform;
}

/* =========================================================
   4. HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 1000; height: var(--header-h);
  display: flex; align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease),
    backdrop-filter var(--dur-base) var(--ease);
}
.site-header.is-scrolled {
  background: var(--color-bg);
  background: color-mix(in srgb, var(--color-bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--color-border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand span { color: var(--color-accent); }

.primary-nav { display: flex; }
.primary-nav ul { display: flex; align-items: center; gap: 2.1rem; }
.primary-nav a {
  position: relative; font-size: 0.92rem; font-weight: 500; color: var(--color-text-muted);
  padding: 0.4rem 0.1rem; transition: color var(--dur-fast) var(--ease);
}
.primary-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
  background: var(--color-accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-fast) var(--ease);
}
.primary-nav a:hover, .primary-nav a:focus-visible { color: var(--color-text); }
.primary-nav a:hover::after { transform: scaleX(1); }
.primary-nav a.is-active { color: var(--color-text); }
.primary-nav a.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--color-border);
  background: var(--color-bg-alt); display: flex; align-items: center; justify-content: center;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.theme-toggle:hover { border-color: var(--color-accent); transform: rotate(20deg); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); background: var(--color-bg-alt);
  position: relative; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 18px; height: 1.5px; background: var(--color-text); transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .primary-nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: var(--color-bg);
    flex-direction: column; padding: var(--space-lg) 1.5rem; transform: translateY(-8px);
    opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
  }
  .primary-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .primary-nav ul { flex-direction: column; align-items: flex-start; gap: 1.6rem; }
  .primary-nav a { font-size: 1.3rem; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn-primary.nav-cta { display: none; }
}

/* =========================================================
   5. REVEAL / SCROLL ANIMATION SYSTEM
   ========================================================= */
body:not(.js-reveal-ready) [data-reveal] { opacity: 1; transform: none; }

.js-reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js-reveal-ready [data-reveal="fade"] { transform: none; }
.js-reveal-ready [data-reveal="left"] { transform: translateX(-26px); }
.js-reveal-ready [data-reveal="right"] { transform: translateX(26px); }
.js-reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal-ready [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   6. HERO
   ========================================================= */
.hero { padding-top: var(--space-2xl); overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--space-lg); align-items: center; }

.hero-copy h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  margin-bottom: 1.4rem;
}
.hero-copy h1 .accent { color: var(--color-accent); }
.hero-lede { font-size: 1.15rem; color: var(--color-text-muted); max-width: 540px; margin-bottom: 2.2rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.6rem; }

.hero-meta { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.hero-person { display: flex; flex-direction: column; }
.hero-person strong { font-size: 0.98rem; }
.hero-person span { font-size: 0.85rem; color: var(--color-text-muted); }
.hero-status { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--color-text-muted); }
.hero-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #59d99a; box-shadow: 0 0 0 3px rgba(89, 217, 154, 0.18); animation: pulse-dot 2.4s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.hero-social { display: flex; gap: 0.6rem; }
.hero-social a {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center; color: var(--color-text-muted);
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.hero-social a:hover { border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-2px); }
.hero-social svg { width: 15px; height: 15px; }

.hero-visual { position: relative; aspect-ratio: 1 / 1.05; will-change: transform; }
.hero-portrait {
  position: relative; z-index: 2; width: 100%; height: 100%; border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--color-border); background: var(--color-bg-alt);
  display: flex; align-items: center; justify-content: center;
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero-portrait .portrait-placeholder { color: var(--color-text-muted); font-size: 0.85rem; text-align: center; padding: 2rem; }

.hero-scan {
  position: absolute; inset: -6%; z-index: 1; pointer-events: none; opacity: 0.85;
}
.hero-scan .ring { fill: none; stroke: var(--color-border); stroke-width: 1; }
.hero-scan .sweep { fill: none; stroke: var(--color-accent); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 120 900; transform-origin: 50% 50%; animation: sweep-rotate 7s linear infinite; }
.hero-scan .node { fill: var(--color-accent); opacity: 0.8; animation: node-blink 3.2s ease-in-out infinite; }
.hero-scan .node:nth-child(3) { animation-delay: 0.6s; }
.hero-scan .node:nth-child(4) { animation-delay: 1.4s; }
.hero-scan .node:nth-child(5) { animation-delay: 2.1s; }
@keyframes sweep-rotate { to { transform: rotate(360deg); } }
@keyframes node-blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.95; } }

@media (prefers-reduced-motion: reduce) {
  .hero-scan .sweep { animation: none; }
  .hero-scan .node { animation: none; opacity: 0.6; }
  .hero-status .dot { animation: none; }
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { max-width: 340px; margin-inline: auto; order: -1; }
}

/* =========================================================
   7. ABOUT
   ========================================================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); align-items: start; }
.about-copy p { color: var(--color-text-muted); margin-bottom: 1.1rem; }
.about-copy p:first-child { color: var(--color-text); font-size: 1.1rem; }
.about-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  padding: 0.55rem 1rem; border: 1px solid var(--color-border); border-radius: 999px;
  font-size: 0.85rem; color: var(--color-text-muted); background: var(--color-bg-alt);
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.chip:hover { border-color: var(--color-accent); color: var(--color-accent); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* =========================================================
   8. SERVICE CARDS
   ========================================================= */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.service-card {
  padding: 2rem 1.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  transition: transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.service-card:hover { transform: translateY(-6px); border-color: var(--color-accent); box-shadow: var(--shadow-md); }
.service-icon {
  width: 46px; height: 46px; border-radius: var(--radius-sm); background: var(--color-accent-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.4rem;
  transition: transform var(--dur-base) var(--ease);
}
.service-card:hover .service-icon { transform: scale(1.08) rotate(-4deg); }
.service-icon svg { width: 21px; height: 21px; color: var(--color-accent); }
.service-card h3 { font-size: 1.08rem; margin-bottom: 0.6rem; }
.service-card p { font-size: 0.92rem; color: var(--color-text-muted); }
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

/* =========================================================
   9. SKILLS
   ========================================================= */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.skill-group { padding: 1.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg-alt); }
.skill-group h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-accent); margin-bottom: 1.1rem; }
.skill-group ul { display: flex; flex-direction: column; gap: 0.7rem; }
.skill-group li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; color: var(--color-text-muted); }
.skill-group li svg { width: 14px; height: 14px; color: var(--color-accent); flex-shrink: 0; }
@media (max-width: 980px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .skills-grid { grid-template-columns: 1fr; } }

/* =========================================================
   10. PROJECTS
   ========================================================= */
.project-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2.2rem; }
.project-filters button {
  padding: 0.55rem 1.1rem; border-radius: 999px; border: 1px solid var(--color-border);
  background: transparent; color: var(--color-text-muted); font-size: 0.85rem; font-weight: 500;
  transition: all var(--dur-fast) var(--ease);
}
.project-filters button:hover { border-color: var(--color-accent); color: var(--color-text); }
.project-filters button.is-active { background: var(--color-accent); border-color: var(--color-accent); color: #0a0a0b; }

.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.project-card {
  position: relative; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border);
  background: var(--color-bg-alt); transition: border-color var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.project-card:hover { border-color: var(--color-accent); transform: translateY(-4px); }
.project-media { position: relative; aspect-ratio: 16 / 11; overflow: hidden; background: var(--color-bg-raised); }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.project-card:hover .project-media img { transform: scale(1.06); }
.project-media .no-image { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--color-text-muted); font-size: 0.85rem; }

.project-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem; background: linear-gradient(0deg, var(--color-overlay) 0%, transparent 65%);
  opacity: 0; transition: opacity var(--dur-base) var(--ease);
}
.project-card:hover .project-overlay { opacity: 1; }
.project-overlay .view-case {
  display: inline-flex; align-items: center; gap: 0.5rem; color: var(--color-accent);
  font-size: 0.85rem; font-weight: 600; transform: translateY(10px); opacity: 0;
  transition: transform var(--dur-base) var(--ease) 60ms, opacity var(--dur-base) var(--ease) 60ms;
}
.project-card:hover .project-overlay .view-case { transform: translateY(0); opacity: 1; }

.project-body { padding: 1.4rem 1.5rem 1.6rem; }
.project-category { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-accent); margin-bottom: 0.5rem; display: block; }
.project-body h3 { font-size: 1.12rem; margin-bottom: 0.5rem; transition: transform var(--dur-base) var(--ease); }
.project-card:hover .project-body h3 { transform: translateX(4px); }
.project-body p { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 0.9rem; }
.project-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tools span { font-size: 0.74rem; padding: 0.28rem 0.65rem; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-muted); }
@media (max-width: 760px) { .project-grid { grid-template-columns: 1fr; } }

/* =========================================================
   11. TIMELINE (Experience / Education)
   ========================================================= */
.timeline { position: relative; max-width: 760px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 1px; background: var(--color-border); }
.timeline-item { position: relative; padding-left: 2.6rem; padding-bottom: 2.6rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: 0; top: 4px; width: 19px; height: 19px; border-radius: 50%; background: var(--color-bg); border: 2px solid var(--color-accent); }
.timeline-year { font-size: 0.8rem; color: var(--color-accent); font-weight: 600; letter-spacing: 0.04em; margin-bottom: 0.3rem; }
.timeline-item h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.timeline-item p { color: var(--color-text-muted); font-size: 0.92rem; }

/* =========================================================
   12. RESUME
   ========================================================= */
.resume-panel {
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: var(--space-lg);
  padding: 2.5rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-bg-alt);
}
.resume-panel h3 { font-size: 1.05rem; margin: 1.6rem 0 0.8rem; }
.resume-panel h3:first-child { margin-top: 0; }
.resume-panel p { color: var(--color-text-muted); font-size: 0.94rem; }
.resume-list { display: flex; flex-direction: column; gap: 0.5rem; }
.resume-list li { color: var(--color-text-muted); font-size: 0.92rem; }
.resume-side { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1rem; border-left: 1px solid var(--color-border); padding-left: var(--space-lg); }
.resume-side p { font-size: 0.85rem; }
@media (max-width: 860px) {
  .resume-panel { grid-template-columns: 1fr; padding: 1.75rem; }
  .resume-side { border-left: none; border-top: 1px solid var(--color-border); padding-left: 0; padding-top: 1.5rem; }
}

/* =========================================================
   13. CONTACT
   ========================================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 1.4rem; }
.contact-info a, .contact-info span.contact-line { display: flex; align-items: center; gap: 0.8rem; color: var(--color-text-muted); font-size: 0.96rem; transition: color var(--dur-fast) var(--ease); }
.contact-info a:hover { color: var(--color-accent); }
.contact-info .icon-wrap { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-info .icon-wrap svg { width: 16px; height: 16px; color: var(--color-accent); }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-size: 0.82rem; color: var(--color-text-muted); }
.form-field input, .form-field textarea {
  background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  padding: 0.85rem 1rem; color: var(--color-text); transition: border-color var(--dur-fast) var(--ease);
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--color-accent); outline: none; }
.form-notice { padding: 0.9rem 1.1rem; border-radius: var(--radius-sm); font-size: 0.9rem; }
.form-notice.success { background: rgba(89, 217, 154, 0.1); color: #59d99a; border: 1px solid rgba(89, 217, 154, 0.3); }
.form-notice.error { background: rgba(224, 92, 92, 0.1); color: #e05c5c; border: 1px solid rgba(224, 92, 92, 0.3); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; } }

/* =========================================================
   14. FOOTER
   ========================================================= */
.site-footer { border-top: 1px solid var(--color-border); padding-block: var(--space-lg); }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-lg); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.footer-brand strong { font-size: 1.1rem; }
.footer-brand p { color: var(--color-text-muted); font-size: 0.9rem; margin-top: 0.4rem; }
.footer-nav ul { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-nav a { color: var(--color-text-muted); font-size: 0.9rem; transition: color var(--dur-fast) var(--ease); }
.footer-nav a:hover { color: var(--color-accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: 1.75rem; border-top: 1px solid var(--color-border); }
.footer-bottom p { color: var(--color-text-muted); font-size: 0.82rem; }
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; color: var(--color-text-muted); transition: all var(--dur-fast) var(--ease); }
.footer-social a:hover { border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-2px); }
.footer-social svg { width: 14px; height: 14px; }

.back-to-top {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 900;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--color-border);
  background: var(--color-bg-raised); display: flex; align-items: center; justify-content: center;
  color: var(--color-text); opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease), border-color var(--dur-fast) var(--ease), visibility var(--dur-base);
  box-shadow: var(--shadow-sm);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-3px); }
.back-to-top svg { width: 17px; height: 17px; transform: rotate(-90deg); }

/* =========================================================
   15. PAGE TRANSITION
   ========================================================= */
body { opacity: 1; transition: opacity 220ms var(--ease); }
body.is-leaving { opacity: 0; }
@media (prefers-reduced-motion: reduce) { body.is-leaving { opacity: 1; } }

/* =========================================================
   16. CASE STUDY / SINGLE PROJECT
   ========================================================= */
.case-hero { padding-top: var(--space-xl); }
.case-hero .container { max-width: 880px; }
.case-back { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--color-text-muted); font-size: 0.88rem; margin-bottom: 1.6rem; }
.case-back:hover { color: var(--color-accent); }
.case-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.case-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.case-cover { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); margin-bottom: var(--space-lg); aspect-ratio: 16/8; background: var(--color-bg-alt); }
.case-cover img { width: 100%; height: 100%; object-fit: cover; }
.case-body { max-width: 780px; margin-inline: auto; display: flex; flex-direction: column; gap: var(--space-lg); }
.case-block h2 { font-size: 1.35rem; margin-bottom: 0.8rem; }
.case-block p { color: var(--color-text-muted); }
.case-block .tools-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.case-block .tools-list span { font-size: 0.82rem; padding: 0.4rem 0.85rem; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-muted); }
.case-placeholder { font-style: italic; opacity: 0.75; }

/* generic page content */
.page-content { padding-top: var(--space-xl); }
.page-content .container { max-width: 780px; }
.page-content article { color: var(--color-text-muted); }
.page-content h1 { color: var(--color-text); margin-bottom: 1.5rem; }
