/* =====================================================
   EDITORIAL MINIMALIST DESIGN SYSTEM - 2026
   ===================================================== */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap");

:root {
  /* --- TYPOGRAPHY --- */
  --font-heading: "Playfair Display", serif;
  --font-body: "Inter", sans-serif;

  /* --- COLOR PALETTE (Monochrome) --- */
  --bg-color: #ffffff;
  --text-primary: #111111;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --accent-color: #000000;
  --border-color: #eeeeee;

  /* --- SPACING & LAYOUT --- */
  --container-width: 1400px;
  --gutter: 2rem;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* --- HEADER HEIGHT (for fixed navbar spacing) --- */
  --header-height: 85px;
}

/* Dark Mode Support (High Contrast) */
[data-theme="dark"] {
  --bg-color: #0d0d0d;
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --text-tertiary: #666666;
  --accent-color: #ffffff;
  --border-color: #222222;
}

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

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.display-text {
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 400;
  line-height: 0.9;
  margin-bottom: 1rem;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 2rem;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.mono {
  font-family:
    "Space Mono", monospace; /* Fallback to monospace if not loaded */
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

/* --- LAYOUT UTILITIES --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

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

/* --- PAGE TRANSITIONS --- */
#app-content {
  min-height: 80vh;
  padding-top: var(--header-height);
}

.page-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.page-content.active {
  display: block !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --- HEADER / NAV --- */
header {
  padding: 2rem 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] header.scrolled {
  background: rgba(13, 13, 13, 0.9);
}

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

.logo {
  display: none;
}

nav ul {
  display: flex;
  gap: 3rem;
}

nav a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  color: var(--text-secondary);
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 1px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

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

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

/* --- HERO SECTION (EDITORIAL) --- */
.hero {
  min-height: calc(100vh - var(--header-height) - 100px);
  padding: 2rem 0 4rem 0;
  margin-top: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  scroll-margin-top: var(--header-height);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  width: 100%;
  align-items: center;
}

.hero-text {
  grid-column: 1 / span 12;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-image-container {
  grid-column: 1 / span 12;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.hero-image {
  height: auto;
  max-height: 75vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(100%) contrast(1.1);
  transition: var(--transition);
}

.hero-image:hover {
  filter: grayscale(0%) contrast(1);
}

/* Floating Elements */
.floating-stat {
  position: absolute;
  background: var(--bg-color);
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border-color);
  z-index: 3;
  font-family: var(--font-heading);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.stat-top-right {
  top: 15%;
  right: 5%;
}
.stat-bottom-left {
  bottom: 20%;
  left: 0;
}

/* --- SECTIONS (MINIMALIST) --- */
section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
  scroll-margin-top: var(--header-height);
}

.section-header {
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--accent-color);
  padding-bottom: 0.25rem;
}

/* List / Table Layout (Experience, Projects) */
.list-item {
  display: grid;
  grid-template-columns: 2fr 4fr 1fr; /* Date | Content | Link */
  gap: 2rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
}

.list-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .list-item:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.list-date {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

.list-content h3 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.list-role {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.list-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 1.5rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: var(--transition);
}

.list-item:hover .list-link {
  opacity: 1;
  transform: translateX(0);
}

/* --- BUTTONS --- */
.btn-minimal {
  display: inline-block;
  padding: 1rem 3rem;
  border: 1px solid var(--text-primary);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  transition: var(--transition);
  cursor: pointer;
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

/* --- BENTO GRID LAYOUT --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.bento-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 2rem;
  transition: var(--transition);
}

.bento-card:hover {
  border-color: var(--text-secondary);
  transform: translateY(-4px);
}

.bento-card.span-2 {
  grid-column: span 2;
}

.bento-card.span-3 {
  grid-column: span 3;
}

.card-icon {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--text-primary);
  padding-bottom: 0.25rem;
  transition: var(--transition);
}

.card-link:hover {
  gap: 0.75rem;
}

.tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-body);
  color: var(--text-secondary);
}

[data-theme="dark"] .tag {
  background: rgba(255, 255, 255, 0.05);
}

/* --- FEATURES SECTION --- */
.features {
  padding: 4rem 0;
}

/* Page specific overrides */
.page-header {
  padding: 60px 0 10px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1rem;
}

.content-section {
  padding-bottom: 4rem;
}

/* --- RESPONSIVE / MOBILE --- */
@media (max-width: 1024px) {
  :root {
    --header-height: 80px;
  }

  .hero {
    height: auto;
    max-height: none;
    min-height: calc(100vh - var(--header-height) - 100px);
    padding-top: 2rem;
    align-items: flex-start;
  }

  .hero-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
  }

  .hero-text {
    text-align: center;
    padding-right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-text p,
  .hero-text h1,
  .hero-text div {
    max-width: 100%;
  }

  .hero-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .hero-image {
    max-height: 65vh;
    width: auto;
  }

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

  .bento-card.span-2,
  .bento-card.span-3 {
    grid-column: span 1;
  }

  .list-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .list-link {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 120px;
  }

  header {
    padding: 1rem 0;
  }

  nav ul {
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
  }

  nav a {
    font-size: 0.8rem;
  }

  .hero {
    height: auto;
    min-height: auto;
    padding-top: 2rem;
    padding-bottom: 4rem;
    align-items: flex-start;
  }

  .hero-text {
    padding: 0 1rem;
  }

  .display-text {
    font-size: clamp(3rem, 10vw, 5rem);
  }

  .hero-image {
    max-height: 50vh;
  }

  section {
    padding: 4rem 0;
  }

  .page-header {
    padding: 100px 0 20px;
  }

  .grid {
    display: block;
  }

  .grid > div {
    margin-bottom: 2rem;
  }

  .section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 1rem;
    --header-height: 110px;
  }

  header {
    padding: 0.75rem 0;
  }

  nav ul {
    gap: 1rem;
  }

  nav a {
    font-size: 0.7rem;
  }

  .hero {
    padding-top: 2rem;
    align-items: flex-start;
  }

  .display-text {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }

  .hero-text p {
    font-size: 1.2rem !important;
  }

  .btn-minimal {
    padding: 0.75rem 2rem;
    font-size: 0.75rem;
  }

  .bento-card {
    padding: 1.5rem;
  }

  .list-item {
    padding: 2rem 0;
  }

  .floating-stat {
    padding: 0.5rem 1rem;
  }

  .stat-top-right {
    top: 10%;
    right: 2%;
    font-size: 0.85rem;
  }

  .stat-bottom-left {
    bottom: 15%;
    left: 2%;
    font-size: 0.85rem;
  }
}
