/* =========================================================
   Victor — Portfolio  |  styles.css
   reset → tokens → layout → components → sections → responsive
   ========================================================= */

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

html { scroll-behavior: smooth; }

img,
svg { display: block; max-width: 100%; }

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

ul { list-style: none; }

/* ---------- Tokens ---------- */
:root {
  --font: 'DM Sans', system-ui, sans-serif;

  --c-text: #1d1d1f;
  --c-muted: #6b7280;
  --c-border: #e6e6e6;
  --c-grey: #f5f5f5;
  --c-placeholder: #ededed;

  --navy: #365570;
  --blue: #0087ec;
  --grad: linear-gradient(282.65deg, #8ac5f1 9.32%, #365570 74.73%);

  --container: 1240px;
  --radius-card: 20px;
  --radius-pill: 999px;

  --transition: 250ms ease;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.5;
  color: var(--c-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(24px, 5.5vw, 80px);
}

/* ---------- Typography ---------- */
h1 {
  font-weight: 600;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.section-title {
  font-weight: 500;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  text-align: center;
}

.card-title {
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 40px);
  line-height: 1.15;
}
.card-title em { font-style: italic; }

.group-label {
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 clamp(16px, 1.6vw, 20px) / 1 var(--font);
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn:hover { transform: translateY(-2px); }

.btn-gradient {
  background: var(--grad);
  color: #fff;
}
.btn-gradient:hover { box-shadow: 0 8px 22px rgba(54, 85, 112, .35); }

.btn-ghost {
  background: #fff;
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn-ghost:hover { border-color: var(--navy); }

.btn-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .85);
}
.btn-light:hover { background: rgba(255, 255, 255, .12); }

.arrow {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header {
  padding-block: 22px 14px;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo img { height: 32px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 17px;
  font-weight: 500;
}
.main-nav a { transition: color var(--transition); }
.main-nav a:hover { color: var(--blue); }

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 72px;
  font-size: 15px;
  color: var(--c-muted);
}
.subnav a { transition: color var(--transition); }
.subnav a:hover { color: var(--c-text); }
.subnav a.is-active { color: var(--blue); font-weight: 600; }

/* Hamburger (mobile only) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  gap: 48px;
  padding-top: 28px;
  padding-bottom: 64px;
}
.hero-text { flex: 1 1 64%; }
.hero h1 { margin-bottom: 28px; max-width: 19ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-photo {
  flex: 0 0 auto;
  width: clamp(240px, 27vw, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background-image: url("../img/victor-foto.webp");
  background-repeat: no-repeat;
  background-size: 190%;
  background-position: 86% 36%;
}

/* ---------- My Work ---------- */
.my-work { padding-bottom: 40px; }

.work-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 26px;
  margin: 14px 0 48px;
  font-size: 16px;
  color: var(--c-muted);
}
.work-tabs a { transition: color var(--transition); }
.work-tabs a:hover { color: var(--c-text); }

.work-group { margin-bottom: 56px; }
.work-group:last-child { margin-bottom: 0; }

/* ---------- Cards ---------- */
.card {
  display: flex;
  gap: 0;
  align-items: stretch;
  height: 360px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 24px;
}
.card:last-child { margin-bottom: 0; }

.card-body {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 36px;
}
.card-sub { margin-top: 6px; color: var(--c-text); }

.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 22px 0;
}
.tag {
  position: relative;
  background: var(--c-grey);
  color: #555;
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 500;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
}
.tag:not(:last-child)::after {
  content: "·";
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  color: #c2c2c2;
  font-weight: 700;
}

.card-btn {
  margin-top: auto;
  align-self: stretch;
  justify-content: center;
}

.card-media {
  flex: 1 1 60%;
  overflow: hidden;
  display: flex;
  background: var(--c-placeholder);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-media.placeholder {
  align-items: center;
  justify-content: center;
}
.card-media.placeholder svg {
  width: 56px;
  height: 56px;
  fill: none;
  stroke: #c4c4c4;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Reverse variant: image left, text stays left-aligned */
.card--reverse { flex-direction: row-reverse; }

/* ---------- Why Me ---------- */
.why-me { padding: 64px 24px; }
.section-sub {
  text-align: center;
  color: var(--c-muted);
  margin: 12px 0 44px;
  font-size: 18px;
}

.why-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 40px;
  max-width: 1000px;
  margin-inline: auto;
}
.why-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1.5px solid #c4cdd6;
  border-radius: 12px;
  padding: 16px 18px;
}
.why-list p { font-size: 16px; color: var(--c-muted); line-height: 1.45; }
.why-list strong { color: var(--c-text); font-weight: 600; }

.check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  background: url("../img/icon-check.svg") center / contain no-repeat;
}

/* ---------- Get In Touch ---------- */
.get-in-touch {
  position: relative;
  margin-top: 32px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 260px 24px 140px;
  background: url("../img/get-in-touch-bg.webp") center 28% / cover no-repeat;
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.get-in-touch::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 14, .88);
  z-index: 1;
}
.wave-top {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: clamp(130px, 20vw, 300px);
  z-index: 3;
  pointer-events: none;
}
.git-inner {
  position: relative;
  z-index: 4;
  max-width: 700px;
  margin-inline: auto;
}
.get-in-touch h2 {
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  margin-bottom: 12px;
}
.get-in-touch p { font-size: clamp(16px, 2vw, 20px); margin-bottom: 30px; }
.git-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; }

/* =========================================================
   About page
   ========================================================= */
.hero--about {
  padding-top: 56px;
  padding-bottom: 56px;
}
.hero--about h1 { max-width: none; }

.hero-photo--ph {
  background-image: none;
  background-color: var(--c-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-photo--ph svg {
  width: 26%;
  height: auto;
  fill: none;
  stroke: #c4c4c4;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-section { padding-block: 56px; }
.about-section .section-title { margin-bottom: 40px; }

.prose p {
  font-size: clamp(16px, 1.6vw, 20px);
  margin-bottom: 22px;
}
.prose p:last-child { margin-bottom: 0; }

.services {
  display: flex;
  flex-direction: column;
  gap: 38px;
}
.service {
  display: flex;
  gap: 30px;
  align-items: baseline;
}
.service-num {
  flex: 0 0 auto;
  min-width: 26px;
  font-weight: 500;
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--c-text);
}
.service-body { flex: 1; }
.service-title {
  font-weight: 600;
  font-size: clamp(18px, 1.8vw, 22px);
  margin-bottom: 12px;
}
.service-body p { font-size: clamp(16px, 1.6vw, 20px); }

/* ---------- Project (case study) page ---------- */
.project-hero {
  align-items: flex-start;
  padding-top: 40px;
  padding-bottom: 56px;
}
.project-hero .hero-text { flex: 1 1 45%; }
.project-hero h1 { max-width: none; margin-bottom: 0; }

.go-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-bottom: 22px;
  transition: color var(--transition);
}
.go-back:hover { color: var(--blue); }
.go-back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-media {
  flex: 1 1 52%;
  align-self: stretch;
  min-height: 340px;
  border: 1.5px solid #c4cdd6;
  border-radius: 24px;
  overflow: hidden;
  background: var(--c-placeholder);
}
.project-media img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   Contact page
   ========================================================= */
.page-contact .site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
}
.site-header--light .main-nav a { color: #fff; }
.site-header--light .main-nav a:hover { color: #cfe3f5; }
.site-header--light .nav-toggle span { background: #fff; }

.contact-hero {
  position: relative;
  background: url("../img/playa-sunset.webp") center / cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 150px 24px 200px;
  overflow: hidden;
}
.contact-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(18, 26, 38, .46);
}
.contact-hero > * { position: relative; z-index: 1; }
.contact-hero h1 {
  font-weight: 600;
  font-size: clamp(34px, 5vw, 52px);
  margin-bottom: 10px;
}
.contact-hero p { font-size: clamp(16px, 2vw, 20px); margin-bottom: 30px; }

.contact-panel {
  position: relative;
  z-index: 5;
  width: min(860px, 100% - clamp(48px, 16vw, 240px));
  margin: -120px auto 90px;
  background: var(--c-grey);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 56px);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font: 500 clamp(16px, 1.5vw, 19px) var(--font);
  color: var(--c-text);
  background: #fff;
  border: 1.5px solid #c4cdd6;
  border-radius: 12px;
  padding: 18px 22px;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #9aa3ad; }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--blue); }
.contact-form .subject { grid-column: 1; }
.contact-form textarea {
  grid-column: 1 / -1;
  min-height: 300px;
  resize: vertical;
}
.btn-send {
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 18px 40px;
  font: 500 clamp(16px, 1.5vw, 19px) var(--font);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-send:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
.btn-send svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 860px) {
  /* Nav → mobile */
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
    z-index: 20;
  }
  .main-nav.open { max-height: 320px; }
  .main-nav a { padding: 14px 24px; border-top: 1px solid var(--c-border); }
  .site-header { position: relative; }

  /* Hero stack — center the photo */
  .hero {
    flex-direction: column-reverse;
    align-items: flex-start;
    text-align: left;
    gap: 28px;
    padding-top: 36px;
  }
  .hero h1 { max-width: none; }
  .hero-photo { align-self: center; }

  /* Cards stack — compact & centered, tags 3 per row */
  .card,
  .card--reverse { flex-direction: column; height: auto; }
  .card-body { padding: 22px; align-items: center; text-align: center; }
  .tags { justify-content: center; gap: 10px 16px; }
  .tag { font-size: 14px; padding: 7px 13px; }
  .card-media { min-height: 220px; }

  /* Why Me single column */
  .why-list { grid-template-columns: 1fr; }

  /* Project hero stacks */
  .project-hero { flex-direction: column; }
  .project-media { width: 100%; }

  /* Contact form single column + dark links in open menu */
  .contact-form { grid-template-columns: 1fr; }
  .site-header--light .main-nav a { color: var(--c-text); }

  /* Get In Touch — shorter on mobile so text isn't too low */
  .get-in-touch { min-height: auto; padding: 150px 24px 90px; }
}

@media (max-width: 480px) {
  .container { padding-inline: 18px; }
  .card-body { padding: 20px; }
  .hero-actions .btn,
  .git-actions .btn { width: 100%; justify-content: center; }
}

/* ===== Language switcher (custom select over Google Translate) ===== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px 3px 8px;
  border-radius: var(--radius-full, 9999px);
  color: inherit;
  cursor: pointer;
  transition: background var(--transition-fast, 150ms ease);
}
.lang-switch:hover { background: rgba(127, 127, 127, 0.1); }
.lang-switch__icon { width: 12px; height: 12px; flex: none; opacity: 0.55; }
.lang-switch__select {
  margin: 0;
  padding: 0 20px 0 2px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}
.lang-switch__select:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 3px; }
.lang-switch__select option { color: #111; background: #fff; }

/* Hide Google Translate's own UI + injected banner/offset */
#google_translate_element,
.goog-te-gadget-simple { position: absolute !important; left: -9999px !important; top: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
/* Neutralize Google's injected top banner / body offset */
body { top: 0 !important; }
.goog-te-banner-frame, .skiptranslate iframe { display: none !important; }
.goog-tooltip, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* ===== Kit Digital funding banner (site footer) ===== */
.kit-digital {
  background: #fff;
  padding: clamp(28px, 5vw, 48px) 20px;
  text-align: center;
}
.kit-digital img {
  display: block;
  width: 100%;
  max-width: 1100px;
  height: auto;
  margin: 0 auto;
}
