/* ============================================================
   Giorgio Tsoupis — Interactive Résumé
   Design: editorial, dark, premium. Inspired by the flow of
   portfolio sites (big type, generous space, restrained motion).
   ============================================================ */

:root {
  --bg: #0A0E1A;
  --bg-2: #0E1424;
  --panel: #121a2e;
  --panel-2: #16203a;
  --line: rgba(148, 163, 184, 0.16);
  --text: #E8EEF7;
  --muted: #93A2BC;
  --muted-2: #6C7A96;
  --accent: #00D4FF;
  --accent-2: #5B8CFF;
  --violet: #6B21E8;
  --grad: linear-gradient(120deg, #6B21E8 0%, #2563EB 55%, #00D4FF 100%);
  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  /* ambient background wash */
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(60vw 60vw at 82% -6%, rgba(0, 212, 255, 0.10), transparent 60%),
    radial-gradient(55vw 55vw at -8% 18%, rgba(107, 33, 232, 0.12), transparent 62%),
    var(--bg);
  z-index: -2;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--accent); color: #001018; padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
  background: transparent; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
}

/* ---------- Custom cursor ---------- */
.cursor, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none; border-radius: 50%; mix-blend-mode: difference; }
.cursor { width: 7px; height: 7px; background: #fff; transform: translate(-50%, -50%); }
.cursor-ring { width: 34px; height: 34px; border: 1.5px solid rgba(255,255,255,0.6); transform: translate(-50%, -50%); transition: width .25s var(--ease), height .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease); }
.cursor-ring.grow { width: 66px; height: 66px; border-color: transparent; background: rgba(0,212,255,0.18); }
body.using-touch .cursor, body.using-touch .cursor-ring { display: none; }
@media (pointer: coarse) { .cursor, .cursor-ring { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 54px);
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease), padding .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
  padding-top: 12px; padding-bottom: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); color: #001018; font-size: 15px; letter-spacing: .5px;
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.25);
}
.brand-name { font-size: 16px; letter-spacing: .2px; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); }
.site-nav a { color: var(--muted); font-size: 15px; font-weight: 500; position: relative; padding: 4px 0; }
.site-nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--accent); transition: width .3s var(--ease); }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--text); }
.site-nav a:hover::after, .site-nav a:focus-visible::after { width: 100%; }
.nav-pdf {
  font-family: var(--font-body); cursor: pointer; color: var(--text); font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .2s var(--ease);
}
.nav-pdf:hover { background: rgba(0,212,255,0.14); border-color: rgba(0,212,255,0.5); }
@media (max-width: 760px) { .brand-name { display: none; } .site-nav a:not(.nav-pdf) { display: none; } .site-nav .nav-pdf { display: inline-block; } }

/* ---------- Layout helpers ---------- */
section, .resume-wrap { position: relative; }
.eyebrow {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .32em;
  font-size: 12.5px; font-weight: 600; color: var(--accent);
}

/* ---------- Hero ---------- */
.hero { max-width: var(--maxw); margin: 0 auto; padding: clamp(120px, 18vh, 200px) clamp(18px, 4vw, 40px) 60px; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 0.85fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero-name {
  font-family: var(--font-display); font-weight: 700; line-height: 0.92;
  font-size: clamp(56px, 12vw, 148px); letter-spacing: -0.03em; margin: 10px 0 6px;
}
.hero-name .line { display: block; overflow: hidden; }
.hero-name .line-inner {
  display: block;
  background: linear-gradient(180deg, #ffffff 0%, #c7d4ea 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-headline { font-family: var(--font-display); font-weight: 600; font-size: clamp(19px, 2.6vw, 30px); color: var(--accent-2); letter-spacing: -0.01em; margin-bottom: 22px; }
.hero-summary { color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); max-width: 60ch; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0; }
.chips li { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,0.045); border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px; font-size: 14px; color: var(--text); }
.chips .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 18px; }
.hero-note { color: var(--muted-2); font-size: 13.5px; max-width: 56ch; }
.hero-note strong { color: var(--muted); }
.hero-social { list-style: none; display: flex; gap: 24px; margin-top: 22px; }
.hero-social a { font-style: italic; color: var(--muted); font-size: 15px; position: relative; }
.hero-social a::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 0; height: 1px; background: currentColor; transition: width .3s var(--ease); }
.hero-social a:hover { color: var(--text); }
.hero-social a:hover::after { width: 100%; }

/* Portrait */
.hero-media { display: flex; justify-content: center; }
.portrait-frame {
  position: relative; width: min(380px, 78vw); aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.04);
  transition: transform .5s var(--ease);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-glow { position: absolute; inset: -2px; border-radius: inherit; background: linear-gradient(160deg, rgba(0,212,255,0.0), rgba(107,33,232,0.28)); mix-blend-mode: screen; pointer-events: none; }
.portrait-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10,14,26,0.5)); pointer-events: none; }

.scroll-hint { display: flex; align-items: center; gap: 10px; margin-top: 54px; color: var(--muted-2); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.scroll-hint i { width: 26px; height: 1px; background: var(--muted-2); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: -26px; top: 0; width: 26px; height: 1px; background: var(--accent); animation: scrollLine 2.2s var(--ease) infinite; }
@keyframes scrollLine { 0% { left: -26px; } 60%,100% { left: 26px; } }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .portrait-frame { width: min(260px, 62vw); }
}

/* ---------- Metrics ---------- */
.metrics {
  max-width: var(--maxw); margin: 0 auto; padding: 30px clamp(18px, 4vw, 40px) 70px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.metric { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.metric-value { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4.4vw, 52px); letter-spacing: -0.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metric-label { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
@media (max-width: 780px) { .metrics { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Résumé gate (blur) ---------- */
.resume-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }
.resume { transition: filter .7s var(--ease), opacity .7s var(--ease); }
.resume-wrap.locked .resume { filter: blur(11px); opacity: .55; pointer-events: none; user-select: none; }
.resume-wrap.locked { position: relative; }

.resume-gate {
  position: absolute; inset: 0; z-index: 20; display: grid; place-items: start center;
  padding-top: clamp(40px, 9vh, 110px);
  background: linear-gradient(180deg, rgba(10,14,26,0.35) 0%, rgba(10,14,26,0.75) 40%, var(--bg) 92%);
  opacity: 1; transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.resume-wrap:not(.locked) .resume-gate { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-inner {
  text-align: center; max-width: 560px; padding: 40px 30px;
  background: rgba(18, 26, 46, 0.72); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.gate-kicker { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .3em; font-size: 12px; color: var(--accent); margin-bottom: 10px; }
.gate-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.02em; }
.gate-text { color: var(--muted); margin: 12px 0 22px; font-size: 15px; }
.gate-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.gate-skip { margin-top: 16px; background: none; border: none; color: var(--muted-2); font-family: var(--font-body); font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.gate-skip:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
}
.btn svg { flex-shrink: 0; }
.btn-primary { background: linear-gradient(120deg, #12d0a1, #00D4FF); color: #00131a; box-shadow: 0 10px 28px rgba(0, 212, 255, 0.28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(0, 212, 255, 0.4); }
.btn-secondary { background: linear-gradient(120deg, #6B21E8, #2563EB); color: #fff; box-shadow: 0 10px 28px rgba(107, 33, 232, 0.3); }
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(37, 99, 235, 0.42); }
.btn-ghost { background: rgba(255,255,255,0.05); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(0,212,255,0.14); border-color: rgba(0,212,255,0.5); transform: translateY(-2px); }
.btn-lg { padding: 17px 30px; font-size: 16px; }

/* ---------- Résumé blocks ---------- */
.resume-toolbar {
  position: sticky; top: 70px; z-index: 15;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; margin: 20px 0 8px;
  background: rgba(14, 20, 36, 0.8); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 14px;
}
.toolbar-label { font-family: var(--font-display); letter-spacing: .2em; text-transform: uppercase; font-size: 12px; color: var(--muted); }

.block { padding: clamp(40px, 7vh, 84px) 0; border-top: 1px solid var(--line); }
.block:first-of-type { border-top: none; }
.block-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 34px; }
.block-index { font-family: var(--font-display); font-weight: 600; color: var(--accent); font-size: 15px; letter-spacing: .1em; }
.block-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 5vw, 56px); letter-spacing: -0.02em; }

/* Experience item */
.exp-item {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 34px); margin-bottom: 22px;
  transition: border-color .4s var(--ease), transform .4s var(--ease);
}
.exp-item:hover { border-color: rgba(0,212,255,0.32); transform: translateY(-3px); }
.exp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.exp-title { font-size: clamp(17px, 2vw, 21px); }
.exp-title strong { font-family: var(--font-display); font-weight: 600; }
.exp-company { color: var(--accent-2); font-weight: 600; }
.exp-dates { font-family: var(--font-display); color: var(--muted); font-size: 14px; white-space: nowrap; letter-spacing: .04em; }
.exp-loc { color: var(--muted-2); font-size: 14px; margin-top: 2px; }
.exp-lead { margin: 16px 0 6px; color: var(--text); font-size: 15.5px; }
.exp-subhead { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .18em; font-size: 11.5px; color: var(--accent); margin: 18px 0 10px; }
.exp-bullets { list-style: none; display: grid; gap: 11px; }
.exp-bullets li { position: relative; padding-left: 24px; color: var(--muted); font-size: 15px; }
.exp-bullets li::before { content: ""; position: absolute; left: 3px; top: 9px; width: 8px; height: 8px; border-radius: 2px; background: var(--grad); }
.exp-bullets strong { color: var(--text); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags li { font-size: 12.5px; color: var(--muted); background: rgba(255,255,255,0.04); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }

/* Earlier */
.earlier { margin-top: 10px; padding-top: 8px; }
.earlier-title { font-family: var(--font-display); font-size: 18px; color: var(--muted); margin-bottom: 16px; }
.earlier-list { list-style: none; display: grid; gap: 18px; }
.earlier-list > li { padding-left: 18px; border-left: 2px solid var(--line); }
.earlier-role strong { font-family: var(--font-display); font-weight: 600; }
.earlier-meta { color: var(--muted-2); font-size: 13.5px; margin: 2px 0 6px; }
.earlier-meta .concurrent { color: var(--accent); }
.earlier-list p { color: var(--muted); font-size: 14.5px; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.skill-card { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: border-color .4s var(--ease), transform .4s var(--ease); }
.skill-card:hover { border-color: rgba(0,212,255,0.32); transform: translateY(-3px); }
.skill-card h3 { font-family: var(--font-display); font-size: 18px; margin-bottom: 14px; }
.skill-card ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.skill-card li { font-size: 13.5px; color: var(--muted); background: rgba(255,255,255,0.04); border: 1px solid var(--line); padding: 7px 13px; border-radius: 999px; }
@media (max-width: 720px) { .skills-grid { grid-template-columns: 1fr; } }

/* Portfolio */
.portfolio-card {
  display: block; position: relative; overflow: hidden;
  background: linear-gradient(120deg, rgba(107,33,232,0.22), rgba(0,212,255,0.14));
  border: 1px solid rgba(0,212,255,0.28); border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px); transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.portfolio-card:hover { transform: translateY(-4px); box-shadow: 0 24px 60px rgba(0,212,255,0.22); }
.portfolio-copy h3 { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 38px); letter-spacing: -0.02em; }
.portfolio-copy p { color: var(--muted); max-width: 62ch; margin: 12px 0 20px; }
.portfolio-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; color: var(--accent); }
.portfolio-link svg { fill: none; stroke: currentColor; stroke-width: 2; transition: transform .3s var(--ease); }
.portfolio-card:hover .portfolio-link svg { transform: translate(3px, -3px); }

/* Education & certs */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 54px); }
.col-title { font-family: var(--font-display); font-size: 16px; color: var(--accent); text-transform: uppercase; letter-spacing: .16em; margin: 26px 0 12px; }
.col-title:first-child { margin-top: 0; }
.plain-list { list-style: none; display: grid; gap: 9px; }
.plain-list li { color: var(--muted); font-size: 15px; padding-left: 18px; position: relative; }
.plain-list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.lang-list { list-style: none; display: grid; gap: 10px; }
.lang-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.lang-list span { font-weight: 500; }
.lang-list em { color: var(--muted-2); font-style: normal; font-size: 13.5px; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 12vh, 140px) clamp(18px, 4vw, 40px); text-align: center; }
.contact-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 7vw, 84px); letter-spacing: -0.03em; margin: 10px auto 30px; max-width: 16ch; }
.contact-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact-alt { color: var(--muted); margin-top: 24px; font-size: 15px; }
.contact-alt a { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 26px clamp(18px, 4vw, 40px); display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted-2); font-size: 14px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--text); }

/* ---------- Floating WhatsApp ---------- */
.fab-whatsapp {
  position: fixed; right: 22px; bottom: 22px; z-index: 140;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #25D366, #12b257); color: #fff;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.fab-whatsapp:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 18px 40px rgba(37, 211, 102, 0.55); }

/* ---------- Reveal animation ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); will-change: opacity, transform; }
[data-reveal].in { opacity: 1; transform: none; }
.hero-name .line-inner { transform: translateY(110%); transition: transform .9s var(--ease); }
.hero-name.in .line-inner { transform: translateY(0); }
.hero-name .line:nth-child(2) .line-inner { transition-delay: .08s; }

/* Reduced motion: disable all movement, show everything */
@media (prefers-reduced-motion: reduce) {
  [data-reveal], .hero-name .line-inner { opacity: 1 !important; transform: none !important; transition: none !important; }
  .scroll-hint i::after { animation: none; }
  .cursor, .cursor-ring { display: none !important; }
  .btn:hover, .exp-item:hover, .skill-card:hover, .portfolio-card:hover, .fab-whatsapp:hover { transform: none; }
}
