/* =============================================
   PORTFOLIO — styles.css
   Organized by: Reset → Variables → Base →
   Components → Layout → Sections → Utilities → Media Queries
   ============================================= */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

ul,
ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}

/* ----- CSS CUSTOM PROPERTIES ----- */
:root {
  /* Colors */
  --color-bg: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-surface: #f8fafc;
  --color-border: #e2e8f0;
  --color-tag-bg: #eff6ff;
  --color-tag-text: #1d4ed8;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --max-width: 1100px;
  --header-height: 64px;
  --radius: 8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07),
    0 2px 4px -2px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07),
    0 4px 6px -4px rgba(0, 0, 0, 0.07);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ----- DARK MODE ----- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f172a;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-accent: #60a5fa;
    --color-accent-hover: #93c5fd;
    --color-surface: #1e293b;
    --color-border: #334155;
    --color-tag-bg: #1e3a5f;
    --color-tag-text: #93c5fd;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4),
      0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4),
      0 4px 6px -4px rgba(0, 0, 0, 0.4);
  }

  .site-header {
    background-color: rgba(15, 23, 42, 0.95);
  }

  .nav-link {
    color: #cbd5e1;
  }
}

/* ----- BASE ----- */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  color: var(--color-text);
  max-width: 65ch;
}

strong {
  font-weight: 600;
}

/* ----- CONTAINER ----- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ----- BUTTONS ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.625rem var(--space-6);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #ffffff;
  border: 2px solid var(--color-accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background-color: var(--color-accent);
  color: #ffffff;
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ----- SECTION TITLES ----- */
.section-title {
  font-size: var(--text-3xl);
  color: var(--color-text);
  margin-bottom: var(--space-10);
}

.section-title-centered {
  text-align: center;
}

/* ----- TAGS ----- */
.tag,
.skill-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background-color: var(--color-tag-bg);
  color: var(--color-tag-text);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ----- SCROLL ANIMATION ----- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--transition-slow),
    transform var(--transition-slow);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.site-header.scrolled {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--color-accent);
}

.nav {
  display: none;
  align-items: center;
  gap: var(--space-8);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition-base);
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

/* ----- HAMBURGER ----- */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: var(--space-2);
  border-radius: var(--radius);
  transition: background-color var(--transition-fast);
}

.hamburger:hover {
  background-color: var(--color-surface);
}

.hamburger span {
  display: block;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 999px;
  transition:
    transform var(--transition-base),
    opacity var(--transition-base);
  transform-origin: center;
}

.site-header.nav-open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ----- MOBILE NAV ----- */
.mobile-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-6);
  transform: translateY(-110%);
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-md);
}

.site-header.nav-open .mobile-nav {
  transform: translateY(0);
}

.mobile-nav-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: var(--header-height);
  margin: calc(-1 * var(--space-6));
  margin-bottom: 0;
  padding: 0 var(--space-6);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.mobile-nav-link {
  display: block;
  font-size: var(--text-lg);
  font-weight: 500;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.mobile-nav-link:hover {
  color: var(--color-text);
}

.mobile-nav-list .btn {
  margin-top: var(--space-2);
  justify-content: center;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  padding: var(--space-12) 0;
}

.hero-inner {
  max-width: 760px;
}

.hero-eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  opacity: 0;
  animation: fadeUp 0.6s ease 0.1s forwards;
}

.hero-headline {
  font-size: clamp(var(--text-4xl), 7vw, var(--text-6xl));
  color: var(--color-text);
  margin-bottom: var(--space-6);
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.text-accent {
  color: var(--color-accent);
}

.hero-tagline {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-10);
  max-width: 60ch;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.3s forwards;
}

.hero-tagline strong {
  color: var(--color-text);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  opacity: 0;
  animation: fadeUp 0.6s ease 0.4s forwards;
}

.hero-ctas .btn {
  padding: 0.75rem var(--space-8);
  font-size: var(--text-base);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   ABOUT
   ============================================= */
.section {
  padding: var(--space-24) 0;
}

.section-alt {
  background-color: var(--color-surface);
}

.about-inner {
  display: grid;
  gap: var(--space-12);
  align-items: start;
}

.photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 400px;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: visible;
}

.photo-placeholder img {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 110%;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-lg);
}

.about-content p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  max-width: 60ch;
}

.about-content p strong {
  color: var(--color-text);
}

.about-content .section-title {
  margin-bottom: var(--space-6);
}

.about-details {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.about-details li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

.icon {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* =============================================
   EXPERIENCE / TIMELINE
   ============================================= */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--color-accent),
    var(--color-border)
  );
  border-radius: 999px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--space-6);
  position: relative;
}

.timeline-marker {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--color-accent);
  border: 3px solid var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
  z-index: 1;
}

.timeline-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

.timeline-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.timeline-card-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.timeline-role {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
}

.timeline-company {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-accent);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.timeline-date,
.timeline-location {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.timeline-date {
  font-weight: 500;
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.timeline-bullets li {
  position: relative;
  padding-left: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.timeline-bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 0.7em;
  top: 0.2em;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

/* =============================================
   SKILLS
   ============================================= */
.skills-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

.skill-group {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}

.skill-group:hover {
  box-shadow: var(--shadow-md);
}

.skill-group-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* =============================================
   CONTACT
   ============================================= */
.contact-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-description {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin: var(--space-4) auto var(--space-10);
  max-width: 50ch;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-6);
  margin-bottom: var(--space-10);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.contact-link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background-color: var(--color-tag-bg);
}

.contact-link svg {
  width: 20px;
  height: 20px;
}

.contact-cta {
  padding: 0.875rem var(--space-10);
  font-size: var(--text-base);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

.footer-inner p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: none;
}

.footer-copy {
  font-size: var(--text-xs) !important;
}

/* =============================================
   MEDIA QUERIES
   ============================================= */

/* Tablet (768px+) */
@media (min-width: 768px) {
  .hero {
    padding: var(--space-24) 0;
  }

  .nav {
    display: flex;
  }

  .hamburger {
    display: none;
  }

  .mobile-nav {
    display: none;
  }

  .about-inner {
    grid-template-columns: 280px 1fr;
  }

  .timeline::before {
    left: 11px;
  }

  .timeline-card-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .timeline-meta {
    text-align: right;
    flex-shrink: 0;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .timeline::before {
    left: 11px;
  }
}
