/* ============================================================
   style.css — Gvantsa Beselia Portfolio
   ============================================================ */

/* ── 1. CSS Custom Properties ─────────────────────────────── */
:root {
  /* Colors */
  --color-bg:           #f8f9fa;
  --color-surface:      #ffffff;
  --color-text:         #2d3e50;
  --color-text-muted:   #6b7c93;
  --color-accent:       #1e3a5f;
  --color-accent-light: #2a5299;
  --color-accent-pale:  #e8eef7;
  --color-border:       #e2e8f0;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', 'Segoe UI', system-ui, sans-serif;

  /* Spacing scale */
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2.5rem;
  --space-2xl:  4rem;
  --space-3xl:  6rem;

  /* Border radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-nav:  0 1px 0 var(--color-border), 0 4px 16px rgba(30,58,95,0.06);
  --shadow-card: 0 2px 12px rgba(30,58,95,0.08);
  --shadow-card-hover: 0 8px 32px rgba(30,58,95,0.14);

  /* Transitions */
  --transition: 0.22s ease;

  /* Layout */
  --container-max: 1100px;
  --nav-height:    68px;
}

/* ── 2. Reset & Base ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* ── 3. Layout Utilities ─────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-xl);
}

.section {
  padding-block: var(--space-3xl);
}

/* ── 4. Navigation ──────────────────────────────────────── */
.nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-nav);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-accent);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: opacity var(--transition);
}
.nav__brand:hover {
  opacity: 0.75;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition);
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
  transition: width var(--transition);
}
.nav__link:hover {
  color: var(--color-accent);
}
.nav__link:hover::after {
  width: 100%;
}

/* Hamburger button (visible on mobile) */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.nav__toggle:hover {
  background: var(--color-accent-pale);
}
.nav__toggle span {
  display: block;
  height: 1.5px;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
  transition: transform var(--transition), opacity var(--transition);
}
/* Animated X state */
.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);
}

/* ── 5. Hero ────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
  /* Subtle warm-to-cool gradient */
  background: linear-gradient(
    145deg,
    #f8f9fa 0%,
    #eef2f9 45%,
    #f0f4fb 100%
  );
}

/* Decorative background blob */
.hero__bg-shape {
  position: absolute;
  top: -120px;
  right: -180px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #c9d8ef 0%, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}

/* Vertical line accent */
.hero__line {
  position: absolute;
  left: calc((100% - var(--container-max)) / 2 + 2.5rem);
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--color-border) 20%,
    var(--color-border) 80%,
    transparent 100%
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: var(--space-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  max-width: 720px;
  margin-inline: 0;       /* left-align within container */
}

.hero__eyebrow {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  /* Animate in */
  animation: fadeUp 0.7s ease both;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--color-accent);
  animation: fadeUp 0.7s ease 0.1s both;
}

.hero__name em {
  font-style: italic;
  font-weight: 500;
  color: var(--color-accent-light);
}

.hero__tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.6;
  animation: fadeUp 0.7s ease 0.2s both;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  animation: fadeUp 0.7s ease 0.3s both;
}

/* ── 6. Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              box-shadow var(--transition), transform var(--transition);
}
.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(30,58,95,0.22);
}
.btn--primary:hover {
  background: var(--color-accent-light);
  box-shadow: 0 4px 20px rgba(30,58,95,0.28);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn--ghost:hover {
  background: var(--color-accent-pale);
  transform: translateY(-1px);
}

/* ── 7. Section Titles (shared) ─────────────────────────── */
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2xl);
}

/* ── 8. About ───────────────────────────────────────────── */
.about {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.about__media {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.about__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  display: block;
  object-fit: cover;
  object-position: 50% 12%;
}

.about__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.about__content p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
}

.about__content p + p {
  margin-top: 0;
}

/* ── 9. Case Studies ────────────────────────────────────── */
.case-studies {
  background: var(--color-bg);
}

.card-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-card-hover), 0 0 0 1px rgba(30, 58, 95, 0.1);
}

.card__media {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--color-accent-pale);
  overflow: hidden;
}

.card__image {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: block;
}

.card__media .card__image {
  height: 100%;
  aspect-ratio: unset;
  border-radius: 0;
}

.card__image.is-hidden {
  display: none;
}

.card__image-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  color: var(--color-accent-light);
}

.card__image-fallback svg {
  width: 48px;
  height: 48px;
  opacity: 0.65;
}

.card__media--fallback .card__image-fallback {
  display: flex;
}

.card__content {
  flex: 1 1 auto;
  padding: var(--space-lg);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.card__description {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border-radius: 40px;
  background: #1e3a5f;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  transition: background var(--transition), transform var(--transition);
}

.card__button:hover {
  background: var(--color-accent-light);
  transform: translateY(-1px);
}

/* ── 10. Side Projects ────────────────────────────────────── */
.side-projects {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

/* ── 11. Section Placeholders ───────────────────────────── */
/*
  These are temporary markers shown until real sections are added.
  Remove .section-placeholder and replace with .section when ready.
*/
.section-placeholder {
  padding-block: var(--space-2xl);
  border-top: 1px dashed var(--color-border);
}

.section-placeholder .container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.placeholder__label {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-border);
  border: 1.5px dashed var(--color-border);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
}

/* ── 12. Footer ──────────────────────────────────────────── */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-xl);
  margin-top: var(--space-2xl);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.footer__copy {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer__social {
  display: flex;
  gap: var(--space-lg);
}

.footer__social-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition);
}
.footer__social-link:hover {
  color: var(--color-accent);
}

/* ── 13. Keyframe Animations ─────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── 14. Responsive ─────────────────────────────────────── */

/* Tablet */
@media (max-width: 768px) {
  :root {
    --space-3xl: 4rem;
  }

  .container {
    padding-inline: var(--space-lg);
  }

  /* Show hamburger, hide link list by default */
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--space-sm) var(--space-lg) var(--space-lg);
    box-shadow: 0 8px 24px rgba(30,58,95,0.1);
    border-bottom: 1px solid var(--color-border);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__link {
    width: 100%;
    padding-block: var(--space-md);
    font-size: 1rem;
    border-bottom: 1px solid var(--color-border);
  }
  .nav__link:last-child {
    border-bottom: none;
  }
  .nav__link::after {
    display: none;
  }

  /* Horizontal line accent hidden on small screens */
  .hero__line {
    display: none;
  }

  .hero__inner {
    max-width: 100%;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .about__media {
    max-width: 320px;
    margin-inline: auto;
  }

  .card {
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
  }

  .section__title {
    margin-bottom: var(--space-xl);
  }
}

@media (min-width: 1024px) {
  .card,
  .card__media,
  .card__image {
    border-radius: 24px;
  }

  .card__media,
  .card__image {
    border-radius: 24px 24px 0 0;
  }

  .card__media .card__image {
    border-radius: 0;
  }
}

@media (max-width: 640px) {
  .card__image,
  .card__media {
    aspect-ratio: 16 / 10;
  }

  .card__media .card__image {
    aspect-ratio: unset;
  }

  .card__content {
    padding: var(--space-md);
  }
}

/* Mobile */
@media (max-width: 480px) {
  .hero__cta {
    flex-direction: column;
  }
  .btn {
    justify-content: center;
    width: 100%;
  }
}
