/* ============================================================
   Petra Kardics — portfolio site
   ============================================================ */

:root {
  --ink: #26344a;
  --ink-soft: #55617a;
  --navy: #33557f;
  --navy-deep: #274264;
  --sky: #5fa8cf;
  --accent: #e8795a;
  --accent-soft: #fbe9e2;
  --paper: #faf7f1;
  --card: #ffffff;
  --line: #e7e0d4;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(38, 52, 74, 0.08);
  --shadow-lift: 0 18px 44px rgba(38, 52, 74, 0.14);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}

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

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; color: var(--navy-deep); }

/* ---------- shared bits ---------- */

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.eyebrow.light { color: #ffd9cc; }

.section-title { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: 0.6rem; }
.section-sub { color: var(--ink-soft); max-width: 46rem; margin-bottom: 2.2rem; }

section { padding: 5.5rem 0; }

.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--navy-deep); box-shadow: var(--shadow-lift); }
.btn-ghost { border: 2px solid var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy-deep); }
.btn-light:hover { box-shadow: 0 12px 30px rgba(0,0,0,0.25); }

/* ---------- reveal animations ---------- */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 241, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(38,52,74,0.06); }

.nav-inner {
  width: min(1120px, 92%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--navy-deep);
}
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--navy-deep); }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  transition: background 0.2s ease;
}
.nav-cta:hover { background: #d9633f; }

.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--navy-deep);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 4.5rem 0 6rem;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(95, 168, 207, 0.14), transparent 70%),
    radial-gradient(500px 350px at 5% 90%, rgba(232, 121, 90, 0.10), transparent 70%);
}

.hero-inner {
  width: min(1120px, 92%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 3rem;
  align-items: center;
}

.hero-hello { font-size: 1.3rem; font-weight: 500; color: var(--accent); margin-bottom: 0.4rem; }

.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); margin-bottom: 1.1rem; }

.accent-underline { position: relative; white-space: nowrap; }
.accent-underline::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.05em;
  height: 0.32em;
  background: var(--accent-soft);
  z-index: -1;
  border-radius: 4px;
}

.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 32rem;
  margin-bottom: 1.6rem;
}

.hero-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1rem 0.45rem 0.45rem;
  font-weight: 500;
  font-size: 0.92rem;
  box-shadow: 0 3px 10px rgba(38,52,74,0.05);
}
.chip-num {
  width: 1.7rem; height: 1.7rem;
  display: grid; place-items: center;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
}
.chip:nth-child(2) .chip-num { background: var(--sky); }
.chip:nth-child(3) .chip-num { background: var(--accent); }

.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.hero-photo { position: relative; justify-self: center; }

.photo-frame {
  width: min(300px, 70vw);
  border-radius: 150px 150px 24px 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  border: 6px solid #fff;
  transform: rotate(2deg);
  transition: transform 0.4s ease;
}
.photo-frame:hover { transform: rotate(0deg) scale(1.02); }
.photo-frame img { width: 100%; height: auto; }

.photo-badge {
  position: absolute;
  bottom: -1.2rem; left: -2.2rem;
  background: #fff;
  border-radius: 14px;
  padding: 0.7rem 1.1rem;
  box-shadow: var(--shadow-lift);
  font-size: 0.85rem;
  line-height: 1.35;
  transform: rotate(-2deg);
}
.photo-badge strong { display: block; color: var(--navy-deep); }
.photo-badge span { color: var(--ink-soft); }

.doodle { position: absolute; stroke: var(--accent); fill: none; stroke-width: 2; opacity: 0.85; }
.doodle-star { width: 34px; top: -18px; right: -10px; fill: var(--sky); stroke: none; animation: spin 14s linear infinite; }
.doodle-spring { width: 60px; top: 40%; left: -74px; stroke: var(--sky); }

@keyframes spin { to { transform: rotate(360deg); } }

.hero-scroll {
  position: absolute;
  left: 50%; bottom: 1.4rem;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--ink-soft);
  border-radius: 999px;
  opacity: 0.55;
}
.hero-scroll span {
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--ink-soft);
  border-radius: 2px;
  animation: scrollhint 1.8s ease-in-out infinite;
}
@keyframes scrollhint {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(12px); opacity: 0.2; }
}

/* ---------- about ---------- */

.about { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.about-copy h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin-bottom: 1.2rem; }
.about-copy p { margin-bottom: 1rem; color: var(--ink-soft); }
.about-copy strong { color: var(--ink); }

.about-howiwork {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  align-self: center;
}
.about-howiwork h3 { font-size: 1.15rem; margin-bottom: 1rem; }

/* ---------- services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }

.service-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 16px;
  margin-bottom: 1.2rem;
  color: #fff;
  background: var(--navy);
}
.service-card:nth-child(2) .service-icon { background: var(--sky); }
.service-card:nth-child(3) .service-icon { background: var(--accent); }
.service-icon svg { width: 28px; height: 28px; }

.service-card h3 { font-size: 1.3rem; margin-bottom: 0.7rem; }
.service-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1rem; }
.service-card ul { list-style: none; }
.service-card li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.service-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- experience / timeline ---------- */

.experience { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.timeline {
  position: relative;
  margin-top: 2.8rem;
  padding-left: 1.5rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.35rem; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--sky), var(--accent));
  border-radius: 2px;
}

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.6rem;
  padding-bottom: 2.2rem;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -1.5rem; top: 8px;
  width: 12px; height: 12px;
  margin-left: -5px;
  background: #fff;
  border: 3px solid var(--accent);
  border-radius: 50%;
}

.tl-date {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  padding-top: 2px;
  white-space: nowrap;
}

.tl-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tl-card:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.tl-card h3 { font-size: 1.15rem; }
.tl-org { color: var(--accent); font-weight: 500; font-size: 0.9rem; margin: 0.15rem 0 0.5rem; }
.tl-card p:last-child { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- portfolio ---------- */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.p-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.p-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }

.p-card > a { display: block; text-decoration: none; color: inherit; }

.shot-frame { overflow: hidden; border-bottom: 1px solid var(--line); }
.shot-frame img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.p-card:hover .shot-frame img { transform: scale(1.05); }

.p-info { padding: 1.1rem 1.3rem 1.3rem; }
.p-info h3 { font-size: 1.1rem; margin-bottom: 0.1rem; }
.p-info .p-domain {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.45rem;
}
.p-info p { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- skills ---------- */

.skills { background: #fff; border-top: 1px solid var(--line); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem;
  margin-top: 2.4rem;
}
.skills-grid-2col { grid-template-columns: 1.2fr 1fr; }

.skill-col h3 { font-size: 1.15rem; margin-bottom: 1rem; }

.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pills span {
  background: var(--accent-soft);
  color: #b05233;
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-size: 0.87rem;
  font-weight: 500;
}
.pills-alt span { background: #e3eef7; color: var(--navy); }

.tool-group { margin-bottom: 1.3rem; }
.tool-group:last-child { margin-bottom: 0; }
.tool-group h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.55rem;
}
.tool-note { font-size: 0.9rem; color: var(--ink-soft); }

.langs { list-style: none; }
.langs li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 0.6rem;
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
}
.langs span { font-weight: 600; }
.langs em { font-style: normal; color: var(--ink-soft); font-size: 0.85rem; }
.langs i {
  grid-column: 1 / -1;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.langs i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--w);
  background: linear-gradient(90deg, var(--sky), var(--navy));
  border-radius: 3px;
}

.edu-title { margin-top: 1.8rem; }
.edu { list-style: none; }
.edu li {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding-left: 1.3rem;
  position: relative;
  margin-bottom: 0.7rem;
}
.edu li::before {
  content: "🎓";
  position: absolute;
  left: 0; top: 1px;
  font-size: 0.8rem;
}
.edu strong { color: var(--ink); display: block; }

/* ---------- looking for ---------- */

.looking { padding: 4.5rem 0; }

.looking-card {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy) 60%, #3c6a99);
  border-radius: 26px;
  padding: 3.2rem clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lift);
  position: relative;
  overflow: hidden;
}
.looking-card::before {
  content: "";
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(95, 168, 207, 0.18);
  top: -140px; right: -100px;
}
.looking-card h2 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 1rem; }
.looking-card p { max-width: 44rem; margin: 0 auto 1.8rem; color: #dbe6f2; }
.looking-card strong { color: #fff; }

/* ---------- contact ---------- */

.contact { text-align: center; padding-bottom: 6rem; }
.contact .section-sub { margin-left: auto; margin-right: auto; }

.contact-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}
.contact-card {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  font-weight: 500;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.contact-card svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0;
  background: #fff;
}
.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.to-top {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--navy-deep);
  transition: transform 0.2s ease, background 0.2s ease;
}
.to-top:hover { transform: translateY(-3px); background: var(--accent-soft); }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-photo { margin-top: 1rem; }
  .hero-chips, .hero-actions { justify-content: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .photo-badge { left: 50%; transform: translateX(-50%) rotate(-2deg); width: max-content; }
  .doodle-spring { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .services-grid, .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  section { padding: 4rem 0; }

  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1.2rem 0 1.6rem;
    gap: 1.1rem;
    display: none;
    box-shadow: 0 16px 30px rgba(38,52,74,0.10);
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }

  .services-grid, .portfolio-grid, .skills-grid { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: 0.4rem; }
  .tl-date { padding-top: 0; }
  .footer .container { flex-direction: column; gap: 0.8rem; }
}
