/* ============================================
   ePortfolio — Tech + Outdoors Design System
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Palette */
  --bg-primary:    #0f1117;
  --bg-secondary:  #161822;
  --bg-card:       rgba(22, 24, 34, 0.75);
  --bg-card-hover: rgba(30, 33, 48, 0.85);
  --bg-nav:        rgba(15, 17, 23, 0.92);

  --accent-green:  #22c55e;
  --accent-blue:   #38bdf8;
  --accent-purple: #a78bfa;
  --accent-amber:  #f59e0b;
  --accent-teal:   #2dd4bf;

  --text-primary:  #e2e8f0;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;

  --border-subtle: rgba(148, 163, 184, 0.08);
  --border-glow:   rgba(34, 197, 94, 0.25);

  --shadow-card:   0 4px 24px rgba(0,0,0,0.3), 0 1px 4px rgba(0,0,0,0.2);
  --shadow-glow:   0 0 30px rgba(34,197,94,0.08);

  /* Typography */
  --font-mono: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max-width:   1120px;
  --nav-height:  64px;
  --radius:      12px;
  --radius-sm:   8px;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent-blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-green); }

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

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.nav__brand svg { width: 28px; height: 28px; }

.nav__links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav__links a {
  display: block;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--accent-green);
  background: rgba(34,197,94,0.08);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__bg svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  min-height: 100%;
  object-fit: cover;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15,17,23,0.5) 0%,
    rgba(15,17,23,0.2) 40%,
    rgba(15,17,23,0.7) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 40px 24px;
}

.hero__title {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hero__subtitle .cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--accent-green);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

.hero__tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

.hero__scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  animation: float 2.5s ease-in-out infinite;
}

.hero__scroll-hint svg {
  width: 28px;
  height: 28px;
  stroke: var(--text-muted);
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* --- Sections --- */
.section {
  padding: 100px 0;
  position: relative;
}

.section--alt {
  background: var(--bg-secondary);
}

.section__header {
  text-align: center;
  margin-bottom: 56px;
}

.section__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.15);
}

.section__icon svg {
  width: 28px;
  height: 28px;
}

.section__title {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.section__title .accent { color: var(--accent-green); }
.section__title .accent-blue { color: var(--accent-blue); }

.section__subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* --- Divider SVG --- */
.divider {
  width: 100%;
  height: 60px;
  overflow: hidden;
  position: relative;
}

.divider svg {
  width: 100%;
  height: 100%;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.card__icon {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
}

.card__title {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.card__text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- About Section --- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about__text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.8;
}

.about__text p:last-child { margin-bottom: 0; }

.about__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__visual svg {
  width: 100%;
  max-width: 380px;
  height: auto;
}

/* --- Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- Strengths list --- */
.strengths-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.strengths-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.strengths-list li:hover {
  border-color: var(--border-glow);
}

.strengths-list li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

/* --- Academic Cards --- */
.academic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.academic-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.academic-card__header {
  padding: 24px 28px;
  background: rgba(34,197,94,0.05);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 14px;
}

.academic-card__header svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.academic-card__header h3 {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
}

.academic-card__body {
  padding: 28px;
}

.academic-card__links {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.academic-card__links a,
.academic-card__links span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-mono);
  background: rgba(56,189,248,0.08);
  color: var(--accent-blue);
  border: 1px solid rgba(56,189,248,0.15);
  transition: all 0.2s;
}

.academic-card__links a:hover {
  background: rgba(56,189,248,0.15);
  border-color: rgba(56,189,248,0.3);
}

.academic-card__reflection h4 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-green);
  margin-bottom: 10px;
  font-weight: 500;
}

.academic-card__reflection p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* --- Footer --- */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer__contact {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer__contact a {
  color: var(--accent-green);
}

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

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.fade-in-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * 0.1s); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border-subtle);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav__hamburger { display: flex; }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about__visual { order: -1; }
  .about__visual svg { max-width: 260px; }

  .grid-2,
  .grid-3,
  .strengths-list {
    grid-template-columns: 1fr;
  }

  .section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .hero__title { font-size: 2rem; }
  .card { padding: 24px; }
}
