/* ================================================
   PORTFOLIO — style.css
   Design tokens: update the :root block to retheme
   the entire site without touching anything else.
================================================ */

/* -----------------------------------------------
   DESIGN TOKENS
   UPDATE these to change the entire site palette.
----------------------------------------------- */
:root {
  /* Core palette */
  --color-bg:          #F7F5F0;   /* warm off-white page background */
  --color-bg-dark:     #0F1629;   /* deep navy — hero, footer, accents */
  --color-bg-card:     #FFFFFF;   /* card surfaces */
  --color-accent:      #C8923F;   /* amber-gold accent */
  --color-accent-dark: #A6721E;   /* darker accent for hover states */

  /* Text */
  --color-text:        #1A1A2E;   /* near-black body text */
  --color-text-muted:  #6B7280;   /* secondary / muted text */
  --color-text-light:  #F7F5F0;   /* text on dark backgrounds */

  /* Borders */
  --color-border:      #E5E2DA;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing & shape */
  --radius-sm:  6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --max-width:  1140px;
  --section-gap: clamp(5rem, 10vw, 9rem);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}


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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* offset for sticky header */
}

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

img { display: block; max-width: 100%; height: auto; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Focus ring — visible for keyboard users */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Reduced-motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}


/* -----------------------------------------------
   LAYOUT UTILITIES
----------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.section {
  padding: var(--section-gap) 0;
}


/* -----------------------------------------------
   FADE-IN ANIMATIONS
   Elements with .fade-in start invisible and slide
   up once they enter the viewport (via JS).
----------------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-delay { transition-delay: 0.15s; }


/* -----------------------------------------------
   TYPOGRAPHY
----------------------------------------------- */
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 2rem;
}


/* -----------------------------------------------
   BUTTONS
----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
              transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(200, 146, 63, 0.30);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-light);
  border-color: rgba(247, 245, 240, 0.4);
}
.btn-ghost:hover {
  background: rgba(247, 245, 240, 0.1);
  border-color: rgba(247, 245, 240, 0.8);
  transform: translateY(-2px);
}

.btn-large {
  font-size: 1rem;
  padding: 1rem 2.5rem;
}


/* -----------------------------------------------
   HEADER / NAV
----------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 22, 41, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.logo:hover { color: var(--color-accent); }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(247, 245, 240, 0.75);
  transition: color 0.2s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--color-accent);
  transition: width 0.25s var(--ease);
  border-radius: 2px;
}
.nav-link:hover { color: var(--color-text-light); }
.nav-link:hover::after { width: 100%; }

.contact-btn {
  background: var(--color-accent);
  color: #fff !important;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s, transform 0.15s;
}
.contact-btn:hover { background: var(--color-accent-dark); transform: translateY(-1px); }
.contact-btn::after { display: none; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--color-text-light);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.mobile-menu {
  display: none;
  background: var(--color-bg-dark);
  border-top: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s var(--ease);
}
.mobile-menu.open { max-height: 300px; }
.mobile-link {
  display: block;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(247, 245, 240, 0.8);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.2s, background 0.2s;
}
.mobile-link:hover { color: var(--color-accent); background: rgba(255,255,255,0.04); }


/* -----------------------------------------------
   HERO SECTION
----------------------------------------------- */
.hero {
  position: relative;
  background: var(--color-bg-dark);
  overflow: hidden;
  padding: clamp(5rem, 12vw, 10rem) 0 clamp(5rem, 10vw, 8rem);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(3rem, 6vw, 5rem);
}

.hero-eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
}

.hero-role {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  color: rgba(247, 245, 240, 0.6);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero-tagline {
  font-size: 1rem;
  color: rgba(247, 245, 240, 0.7);
  max-width: 44ch;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

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

/* Decorative background initial */
.hero-watermark {
  position: absolute;
  right: -0.05em;
  bottom: -0.25em;
  font-family: var(--font-display);
  font-size: clamp(20rem, 35vw, 40rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.04);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero-photo { position: relative; z-index: 1; }

.photo-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: rgba(255,255,255,0.05);
}

.photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* Fallback when photo is absent */
.photo-frame.photo-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e2d50 0%, #0f1629 100%);
}
.photo-fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(247,245,240,0.5);
  text-align: center;
  gap: 0.75rem;
}
.photo-frame.photo-placeholder .photo-fallback { display: flex; }
.photo-fallback span {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  color: rgba(247,245,240,0.15);
}
.photo-fallback p { font-size: 0.8rem; line-height: 1.5; }
.photo-fallback code {
  background: rgba(255,255,255,0.08);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-family: monospace;
}

/* Gold accent border behind photo */
.photo-accent {
  position: absolute;
  bottom: -14px; right: -14px;
  width: 100%; height: 100%;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-lg);
  z-index: -1;
  pointer-events: none;
}


/* -----------------------------------------------
   ABOUT SECTION
----------------------------------------------- */
.about {
  background: var(--color-bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.about-story p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  font-size: 1.0rem;
}

.about-facts {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 2.5rem 0;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.fact-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.fact-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* About photo */
.about-photo-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--color-border);
  margin-bottom: 1.5rem;
}

.about-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.about-photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  background: var(--color-border);
}

/* Quick facts sidebar */
.quick-facts {
  background: var(--color-bg-dark);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quick-fact {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: rgba(247,245,240,0.75);
  line-height: 1.5;
}

.qf-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.05rem; }


/* -----------------------------------------------
   WORK / PROJECTS
----------------------------------------------- */
.work {
  background: var(--color-bg-card);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.project-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(15, 22, 41, 0.12);
}

.project-img-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-bg-dark);
}
.project-img-wrap.project-img-placeholder {
  background: linear-gradient(135deg, #1e2d50 0%, #0f1629 100%);
}

.project-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.project-card:hover .project-img { transform: scale(1.04); }

.project-body { padding: 1.5rem; }

.project-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  background: rgba(200, 146, 63, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.65;
}

.project-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  transition: color 0.2s, letter-spacing 0.2s;
}
.project-link:hover { color: var(--color-accent-dark); letter-spacing: 0.02em; }


/* -----------------------------------------------
   SKILLS
----------------------------------------------- */
.skills {
  background: var(--color-bg);
}

.skills-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 3rem;
  margin-top: 1rem;
}

.skill-group-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--color-border);
}

.skill-list { display: flex; flex-direction: column; gap: 1.1rem; }

.skill-item { display: flex; flex-direction: column; gap: 0.35rem; }

.skill-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.skill-bar {
  height: 5px;
  background: var(--color-border);
  border-radius: 99px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0; /* animated to data-level via JS */
  background: var(--color-accent);
  border-radius: 99px;
  transition: width 0.9s var(--ease);
}

/* Soft-skill tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.tag {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.8rem;
  transition: background 0.2s, border-color 0.2s;
}
.tag:hover {
  background: rgba(200, 146, 63, 0.08);
  border-color: var(--color-accent);
}


/* -----------------------------------------------
   CONTACT
----------------------------------------------- */
.contact {
  background: var(--color-bg-dark);
}

.contact-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.contact-inner .section-label { color: var(--color-accent); }

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: var(--color-text-light);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.contact-sub {
  font-size: 1rem;
  color: rgba(247, 245, 240, 0.6);
  max-width: 44ch;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid rgba(247, 245, 240, 0.18);
  border-radius: 50%;
  color: rgba(247, 245, 240, 0.55);
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.social-link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  transform: translateY(-3px);
}


/* -----------------------------------------------
   FOOTER
----------------------------------------------- */
.site-footer {
  background: rgba(0,0,0,0.25);
  border-top: 1px solid rgba(255,255,255,0.07);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-footer p {
  font-size: 0.8rem;
  color: rgba(247, 245, 240, 0.35);
}

.back-to-top {
  font-size: 1.2rem;
  color: rgba(247, 245, 240, 0.35);
  transition: color 0.2s, transform 0.2s;
  line-height: 1;
}
.back-to-top:hover { color: var(--color-accent); transform: translateY(-3px); }


/* -----------------------------------------------
   RESPONSIVE
----------------------------------------------- */

/* Tablet */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-photo { order: -1; max-width: 340px; margin: 0 auto; }
  .hero-watermark { font-size: 55vw; }

  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
  }
  .about-photo-wrap { margin-bottom: 0; }
}

/* Mobile */
@media (max-width: 640px) {
  /* Show hamburger, hide desktop nav */
  .hamburger { display: flex; }
  .nav-list  { display: none; }
  .mobile-menu { display: block; }

  .about-aside { grid-template-columns: 1fr; }
  .about-facts { gap: 1.25rem; }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    height: auto;
    padding: 1.25rem 0;
    text-align: center;
  }

  .projects-grid { grid-template-columns: 1fr; }
}
