/* =====================================================
   Dmitriy Khrypko — Portfolio v4
   Dark theme · White & dark · DM Sans
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg:           #0d0f14;
  --bg2:          #13161e;
  --bg3:          #1a1e2a;
  --surface:      #1e2230;
  --border:       rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.15);
  --white:        #ffffff;
  --text:         #e8eaf0;
  --text-muted:   #8a94ad;
  --text-dim:     #4a5368;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --nav-h:        64px;
  --r:            12px;
  --r-card:       16px;
  --transition:   0.3s cubic-bezier(0.4,0,0.2,1);
  --tveyes-bg:    #042441;
  --toolsgroup-bg:#003FC3;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--white); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.75; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; outline: none; background: none; }

/* ── Utility ── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.section-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; display: block; }
.section-title { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 20px; color: var(--white); }
.section-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; line-height: 1.7; }
.tag { display: inline-block; font-size: 11px; font-weight: 500; font-family: var(--font-mono); padding: 3px 10px; border-radius: 4px; background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid var(--border); white-space: nowrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; transition: var(--transition); cursor: pointer; white-space: nowrap; font-family: var(--font-body); }
.btn-hero-primary { background: var(--white); color: #000; border: none; }
.btn-hero-primary:hover { background: #e0e0e0; opacity: 1; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.3); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); opacity: 1; transform: translateY(-2px); }
.btn-primary { background: var(--white); color: #000; border: none; }
.btn-primary:hover { background: #e0e0e0; opacity: 1; }

/* ── Navigation ── */
#nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 100; background: rgba(13,15,20,0.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.nav-logo { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--white); }
.nav-logo span { color: var(--text-muted); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.875rem; font-weight: 500; color: var(--text-muted); transition: color var(--transition); position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--white); transition: width var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--white); opacity: 1; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 16px; }
/* Consistent CV button across all pages */
.btn-cv { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 0.8rem; background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.3); transition: var(--transition); white-space: nowrap; font-family: var(--font-body); cursor: pointer; text-decoration: none; }
.btn-cv:hover { border-color: var(--white); background: rgba(255,255,255,0.08); opacity: 1; transform: translateY(-1px); }
.btn-cv svg { flex-shrink: 0; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 6px; cursor: pointer; background: none; border: none; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
/* Animated X when open */
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--bg2); border-bottom: 1px solid var(--border); padding: 8px 24px 20px; flex-direction: column; gap: 0; z-index: 99; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.nav-mobile a { font-size: 1rem; font-weight: 500; color: var(--text-muted); padding: 12px 0; border-bottom: 1px solid var(--border); display: block; transition: color var(--transition); }
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--white); opacity: 1; }
.nav-mobile.open { display: flex; }

/* ── Hero ── */
#hero { min-height: 100vh; display: flex; align-items: center; padding-top: var(--nav-h); position: relative; overflow: hidden; background: var(--bg); }
.hero-bg-img { display: none; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; padding: 40px 0 80px; width: 100%; }
.hero-photo-wrap { flex-shrink: 0; padding-top: 8px; }
.hero-photo-oval { width: 210px; height: 260px; border-radius: 50%; overflow: hidden; border: 2px solid rgba(255,255,255,0.15); box-shadow: 0 24px 64px rgba(0,0,0,0.5); }
.hero-photo-oval img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-name { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; color: var(--white); margin-bottom: 16px; white-space: nowrap; }
.hero-role-line { font-size: clamp(1.3rem, 2.5vw, 2rem); font-weight: 600; color: var(--white); margin-bottom: 28px; height: 2.6rem; display: flex; align-items: center; font-family: var(--font-mono); letter-spacing: -0.01em; overflow: hidden; }
.hero-cursor { display: inline-block; width: 2px; height: 1.1em; background: var(--white); margin-left: 3px; animation: blink 1s step-end infinite; vertical-align: text-bottom; }
@keyframes blink { 50% { opacity: 0; } }
.hero-desc { color: rgba(255,255,255,0.7); font-size: 1.05rem; line-height: 1.75; max-width: 520px; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero-socials { display: flex; align-items: center; gap: 12px; }
.hero-social-link { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.6); transition: var(--transition); }
.hero-social-link:hover { border-color: var(--white); color: var(--white); background: rgba(255,255,255,0.1); opacity: 1; }
.hero-scroll { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: rgba(255,255,255,0.3); font-size: 0.65rem; font-family: var(--font-mono); letter-spacing: 0.15em; animation: float 3s ease-in-out infinite; z-index: 1; }
@keyframes float { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }

/* ── Stats ── */
#stats { padding: 72px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg2); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.stat-card { background: var(--bg2); padding: 36px 32px; display: flex; flex-direction: column; gap: 8px; transition: background var(--transition); }
.stat-card:hover { background: var(--surface); }
.stat-num { font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--white); }
.stat-label { font-size: 0.95rem; color: var(--text-muted); line-height: 1.4; }
.stat-sub { font-size: 0.75rem; font-family: var(--font-mono); color: var(--text-dim); }

/* ── Works ── */
#works { padding: 120px 0; }
.works-header { margin-bottom: 64px; }
.works-layout { display: grid; grid-template-columns: 180px 1fr; gap: 48px; align-items: start; }
.works-nav { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 4px; }
.works-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: var(--transition); text-align: left; width: 100%; }
.works-nav-item::before { content: ''; width: 20px; height: 2px; background: var(--border-light); border-radius: 1px; transition: var(--transition); flex-shrink: 0; }
.works-nav-item:hover, .works-nav-item.active { color: var(--white); background: rgba(255,255,255,0.05); }
.works-nav-item.active::before { background: var(--white); width: 28px; }
.works-list { display: flex; flex-direction: column; gap: 40px; }

/* ── Project Card (home) ── */
.project-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; transition: border-color var(--transition); }
.project-card:hover { border-color: rgba(255,255,255,0.2); }
.project-intro { padding: 32px 32px 0; display: flex; flex-direction: column; gap: 14px; }
.project-client-logo { height: 28px; width: auto; object-fit: contain; object-position: left center; background: transparent; mix-blend-mode: normal; }
.project-intro-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; max-width: 700px; }
.project-hr-title { font-size: 1.25rem; font-weight: 700; color: var(--white); letter-spacing: -0.01em; }
.project-preview-block { margin: 24px 32px 0; border-radius: 8px; display: grid; grid-template-columns: 1fr 1.4fr; overflow: hidden; }
.tveyes-block { background: var(--tveyes-bg); }
.toolsgroup-block { background: var(--toolsgroup-bg); }
.rocky-block { background: #f0f2f5; }
.project-preview-text { padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.project-preview-lead { font-size: 0.9rem; line-height: 1.65; color: rgba(255,255,255,0.75); }
.rocky-block .project-preview-lead { color: #374151; }
.project-preview-sub { font-size: 0.8rem; color: rgba(255,255,255,0.5); line-height: 1.5; }
.rocky-block .project-preview-sub { color: #6b7280; }
.project-kpi-list { display: flex; flex-wrap: wrap; gap: 16px; }
.project-kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi-val { font-size: 1.6rem; font-weight: 700; font-family: var(--font-mono); color: var(--white); line-height: 1; }
.rocky-block .kpi-val { color: #111827; }
.kpi-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.45); font-family: var(--font-mono); }
.rocky-block .kpi-label { color: #6b7280; }
.usability-badge { width: 73px; height: 84px; object-fit: contain; display: block; margin-top: 8px; background: transparent; mix-blend-mode: normal; }
.project-preview-img-wrap { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 20px; }
.rocky-img-wrap { padding: 20px; }
.project-preview-img-link { display: block; width: 100%; max-width: 380px; }
.preview-screen-frame { border-radius: 8px; overflow: hidden; border: none; box-shadow: none; outline: none; transition: transform 0.5s ease; }
.project-preview-img-link:hover .preview-screen-frame { transform: scale(1.03); }
.rocky-img-wrap .preview-screen-frame { border-radius: 8px; border: none; box-shadow: none; background: transparent; outline: none; }
.rocky-img-wrap .project-preview-img-link:hover .preview-screen-frame { transform: scale(1.03); }
.project-preview-img { width: 100%; display: block; background: transparent; border: none; outline: none; }
.project-card-footer { padding: 20px 32px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 24px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.875rem; color: var(--white); white-space: nowrap; transition: gap var(--transition); flex-shrink: 0; }
.project-more:hover { gap: 12px; opacity: 1; }

/* ── PROJECT DETAIL PAGE ── */
#project-hero { padding: calc(var(--nav-h) + 64px) 0 0; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-dim); margin-bottom: 32px; font-family: var(--font-mono); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--white); opacity: 1; }
.breadcrumb span { color: var(--border-light); }

/* Meta bar — borderless */
.project-meta-bar { display: flex; flex-wrap: wrap; gap: 32px; margin-bottom: 28px; }
.project-meta-item { display: flex; flex-direction: column; gap: 4px; }
.project-meta-key { font-size: 10px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 2px; }
.project-meta-val { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; }

/* Skills groups — Option 2 */
.skills-groups { display: flex; flex-wrap: wrap; gap: 20px; padding: 24px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); margin-top: 48px; }
.skills-groups-title { width: 100%; font-size: 10px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-dim); margin-bottom: 4px; }
.skill-group-block { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.skill-group-name { font-size: 10px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.skill-pill-row { display: flex; flex-wrap: wrap; gap: 5px; }
.skill-pill { font-size: 11px; padding: 3px 9px; border-radius: 4px; background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }

/* Hero image */
.project-hero-img { width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); margin: 24px 0 0; }
.project-hero-img img { width: 100%; display: block; }

/* Content layout — full width, no sidebar */
.project-page-body { padding: 0 0 80px; }

/* Sticky section nav + content */
.project-content-wrap { display: grid; grid-template-columns: 160px 1fr; gap: 48px; align-items: start; margin-top: 48px; }
.project-section-nav { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 2px; }
.project-section-nav-title { font-size: 10px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 10px; padding-left: 14px; }
.psn-item { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 6px; font-size: 0.8rem; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: var(--transition); text-align: left; width: 100%; }
.psn-item::before { content: ''; width: 14px; height: 1.5px; background: var(--border-light); border-radius: 1px; transition: var(--transition); flex-shrink: 0; }
.psn-item:hover, .psn-item.active { color: var(--white); background: rgba(255,255,255,0.05); }
.psn-item.active::before { background: var(--white); width: 20px; }

/* Key section blocks */
.project-sections { display: flex; flex-direction: column; gap: 64px; }
.key-section { scroll-margin-top: calc(var(--nav-h) + 24px); }
.key-section-num { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 6px; }
.key-section-title { font-size: 1.4rem; font-weight: 700; color: var(--white); letter-spacing: -0.02em; margin-bottom: 14px; line-height: 1.2; }
.key-section-text { color: var(--text-muted); font-size: 0.95rem; line-height: 1.75; margin-bottom: 16px; }
.key-section-text ul { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.key-section-text ul li { padding-left: 18px; position: relative; }
.key-section-text ul li::before { content: '→'; position: absolute; left: 0; color: rgba(255,255,255,0.3); font-size: 0.8rem; }
.key-section-img { margin-top: 20px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.key-section-img img { width: 100%; display: block; }

/* Intro sections (overview, challenges, role) */
.project-intro-sections { display: flex; flex-direction: column; gap: 36px; margin-bottom: 0; }
.intro-section h2 { font-size: 1.3rem; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.intro-section p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.75; margin-bottom: 10px; }
.intro-section ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.intro-section ul li { color: var(--text-muted); font-size: 0.95rem; padding-left: 18px; position: relative; line-height: 1.6; }
.intro-section ul li::before { content: '→'; position: absolute; left: 0; color: rgba(255,255,255,0.3); font-size: 0.8rem; }

/* Results section */
.results-section { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--border); }
.results-section h2 { font-size: 1.4rem; font-weight: 700; color: var(--white); margin-bottom: 24px; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 20px; }
.result-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 20px; text-align: center; }
.result-card .val { font-size: 1.8rem; font-weight: 700; color: var(--white); font-family: var(--font-mono); display: block; margin-bottom: 4px; }
.result-card .lbl { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }

/* Project page next/prev */
.project-next { border-top: 1px solid var(--border); padding: 48px 0; display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 48px; }
.project-next-label { font-size: 0.75rem; font-family: var(--font-mono); color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.project-next-name { font-size: 1.1rem; font-weight: 600; color: var(--white); }

/* ── About page ── */
#about-hero { padding: calc(var(--nav-h) + 80px) 0 80px; border-bottom: 1px solid var(--border); }
.about-hero-grid { display: grid; grid-template-columns: 1fr 300px; gap: 64px; align-items: center; }
.about-photo { width: 300px; height: 360px; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.about-photo-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 5rem; background: var(--bg3); }
#skills-section { padding: 80px 0; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-top: 48px; }
.skill-group { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; }
.skill-group-title { font-size: 0.75rem; font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag { font-size: 0.8rem; padding: 4px 10px; border-radius: 4px; background: var(--bg3); color: var(--text-muted); border: 1px solid var(--border); }
#experience-section { padding: 80px 0; border-top: 1px solid var(--border); }
.timeline { position: relative; padding-left: 28px; margin-top: 48px; }
.timeline::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 0; width: 1px; background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent); }
.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item::before { content: ''; position: absolute; left: -32px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--white); border: 2px solid var(--bg); }
.timeline-period { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.05em; }
.timeline-role { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; color: var(--white); }
.timeline-company { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 10px; }
.timeline-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

/* ── Footer ── */
#footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; margin-bottom: 48px; }
.footer-logo { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; color: var(--white); }
.footer-logo span { color: var(--text-muted); }
.footer-tagline { color: var(--text-muted); font-size: 0.9rem; line-height: 1.8; }
.footer-contact-title { font-size: 0.75rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 20px; }
.contact-links { display: flex; flex-direction: column; gap: 14px; }
.contact-link { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 0.9rem; transition: color var(--transition); }
.contact-link:hover { color: var(--white); opacity: 1; }
.contact-link-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--bg3); border: 1px solid var(--border); color: var(--text-muted); flex-shrink: 0; transition: var(--transition); }
.contact-link:hover .contact-link-icon { border-color: rgba(255,255,255,0.2); color: var(--white); background: var(--surface); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--text-dim); flex-wrap: wrap; }
.footer-social { display: flex; gap: 16px; }
.footer-social a { color: var(--text-dim); font-size: 0.8rem; font-family: var(--font-mono); transition: color var(--transition); }
.footer-social a:hover { color: var(--white); opacity: 1; }

/* ── Reveal ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 32px; align-items: center; }
  .hero-photo-wrap { order: -1; display: flex; justify-content: center; padding-top: 0; }
  .hero-name { white-space: normal; }
  /* Typed text: centered, enough height for 2 lines so it never clips */
  .hero-role-line { justify-content: center; height: auto; min-height: 5rem; align-items: flex-start; padding-top: 4px; overflow: visible; white-space: normal; word-break: break-word; }
  /* Hide scroll mouse on mobile */
  .hero-scroll { display: none; }
  .hero-desc, .hero-actions, .hero-socials { justify-content: center; }
  .works-layout { grid-template-columns: 1fr; }
  .works-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .about-hero-grid { grid-template-columns: 1fr; }
  .about-photo { margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .stats-grid { grid-template-columns: 1fr; }
  .project-preview-block { grid-template-columns: 1fr; }
  .project-preview-img-wrap { padding: 0 20px 0; }
  .project-content-wrap { grid-template-columns: 1fr; }
  .project-section-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .project-section-nav-title { width: 100%; }
  .project-meta-bar { gap: 20px; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .nav-links, .nav-cta .btn-cv { display: none; }
  .nav-hamburger { display: flex; }
  .hero-photo-oval { width: 160px; height: 196px; }
  .project-intro { padding: 20px 20px 0; }
  .project-preview-block { margin: 16px 20px 0; }
  .project-card-footer { padding: 16px 20px 20px; }
  .project-next { flex-direction: column; }
  .skills-groups { gap: 14px; }
}
