/* Parham Pourdavood — Modern Minimal Layout */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --bg: #f6f4f0;
  --surface: rgba(255,255,255,0.55);
  --surface-hover: rgba(255,255,255,0.8);
  --text: #1a1a1a;
  --text-2: #4a4a4a;
  --text-3: #8a8a8a;
  --accent: #c45d3e;
  --accent-soft: rgba(196,93,62,0.08);
  --link: #1a1a1a;
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.15);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --blur: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #111111;
  --surface: rgba(255,255,255,0.05);
  --surface-hover: rgba(255,255,255,0.1);
  --text: #e8e8e8;
  --text-2: #a0a0a0;
  --text-3: #666666;
  --accent: #e07050;
  --accent-soft: rgba(224,112,80,0.1);
  --link: #e8e8e8;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

/* Subtle grain texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  z-index: 9999;
}

::selection {
  background: var(--accent);
  color: #fff;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}
a:hover {
  color: var(--accent);
}

/* ========================
   DARK MODE TOGGLE
   ======================== */
.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all var(--transition);
  opacity: 0.6;
  line-height: 1;
}
.theme-toggle:hover {
  opacity: 1;
  border-color: var(--border-hover);
  transform: scale(1.08);
}

/* ========================
   FULL PAGE LAYOUT
   ======================== */
.page {
  display: grid;
  grid-template-columns: 1fr 1px 1.1fr 1px 1fr;
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ========================
   DIVIDERS — clean minimal
   ======================== */
.vdivider {
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--border) 15%,
    var(--border) 85%,
    transparent 100%
  );
}

/* Each column */
.col {
  padding: 56px 44px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.col::-webkit-scrollbar {
  width: 3px;
}
.col::-webkit-scrollbar-track {
  background: transparent;
}
.col::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ========================
   ENTRANCE ANIMATIONS
   ======================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.col-left .photo {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
.col-left .name {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
.col-left .subtitle {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
.col-left .bio {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}
.col-left .connect-row {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

/* Scroll-linked fade for items in middle/right columns */
.scroll-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================
   LEFT COLUMN — Identity
   ======================== */
.col-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  position: relative;
}

.photo {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 10%;
  border: 2px solid var(--border);
  margin: 0 auto 28px auto;
  transition: border-color var(--transition), transform var(--transition);
}
.photo:hover {
  border-color: var(--border-hover);
  transform: scale(1.02);
}

.name {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  text-align: center;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 28px;
  line-height: 1.5;
  text-align: center;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.bio {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-2);
  margin-bottom: 32px;
  text-align: justify;
}
.bio strong {
  color: var(--text);
  font-weight: 500;
}

.connect-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.connect-pill {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2) !important;
  transition: all var(--transition);
  text-decoration: none !important;
}
.connect-pill:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ========================
   FEATURED SPOTLIGHT
   ======================== */
.spotlight-title-header {
  margin-top: 32px;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
}

.spotlight-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-decoration: none !important;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}
.spotlight-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.spotlight-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--border);
}

.spotlight-body {
  padding: 14px 16px;
}

.spotlight-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}

.spotlight-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text) !important;
  margin-bottom: 4px;
}

.spotlight-desc {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.45;
}

/* ========================
   SECTION TITLES
   ======================== */
.section-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.5;
}

/* ========================
   PUBLICATIONS
   ======================== */
.pub-list {
  list-style: none;
  margin-bottom: 36px;
}
.pub-item {
  margin-bottom: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition);
}
.pub-item:hover {
  background: var(--surface);
  border-color: var(--border);
}
.pub-title {
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 3px;
}
.pub-title a {
  color: var(--text);
  transition: color var(--transition);
}
.pub-title a:hover {
  color: var(--accent);
}
.pub-meta {
  font-size: 0.8rem;
  color: var(--text-3);
}
.pub-meta strong {
  color: var(--text-2);
  font-weight: 500;
}

/* ========================
   TALKS & EXPERIENCE
   ======================== */
.talk-list {
  list-style: none;
}
.talk-item {
  margin-bottom: 4px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.45;
  border: 1px solid transparent;
  transition: all var(--transition);
}
.talk-item:hover {
  background: var(--surface);
  border-color: var(--border);
}
.talk-name {
  font-weight: 500;
  color: var(--text);
}
.talk-name a {
  color: var(--text);
  transition: color var(--transition);
}
.talk-name a:hover {
  color: var(--accent);
}
.talk-detail {
  color: var(--text-3);
  font-size: 0.82rem;
}

/* ========================
   SOFTWARE & SIMPLE LISTS
   ======================== */
.simple-list {
  list-style: none;
  margin-bottom: 36px;
}
.simple-list li {
  margin-bottom: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: all var(--transition);
}
.simple-list li:hover {
  background: var(--surface);
  border-color: var(--border);
}
.simple-list li strong {
  color: var(--text);
  font-weight: 500;
}

/* Playlist / Video section */
.playlist-label {
  font-size: 0.82rem;
  color: var(--text-3);
  font-style: italic;
  margin-bottom: 12px;
  padding-left: 14px;
}

/* ========================
   FOOTER
   ======================== */
.footer {
  margin-top: auto;
  padding-top: 24px;
  font-size: 0.75rem;
  color: var(--text-3);
  text-align: center;
}
.footer-mobile {
  display: none;
}

/* ========================
   RESPONSIVE
   ======================== */

/* Tablet — 2 columns: left identity | right stacked content */
@media (max-width: 1100px) {
  .col {
    padding: 40px 32px;
  }
}

/* Stack to single column */
@media (max-width: 900px) {
  html, body {
    overflow: auto;
    height: auto;
  }
  .page {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .vdivider {
    width: 100%;
    height: 1px;
    margin: 8px 0;
    background: linear-gradient(
      to right,
      transparent 0%,
      var(--border) 15%,
      var(--border) 85%,
      transparent 100%
    );
  }
  .col {
    padding: 36px 24px;
    overflow-y: visible;
  }
  .col-left {
    padding-bottom: 36px;
  }
  .photo {
    width: 120px;
    height: 120px;
  }
  .name {
    font-size: 1.7rem;
  }
  .theme-toggle {
    top: 16px;
    right: 16px;
  }
  .spotlight-card,
  .spotlight-title-header {
    display: none;
  }
  .col-left .footer {
    display: none;
  }
  .footer-mobile {
    display: block;
    padding: 32px 24px 40px;
  }
  /* Disable entrance animations on mobile */
  .col-left .photo,
  .col-left .name,
  .col-left .subtitle,
  .col-left .bio,
  .col-left .connect-row {
    animation: none;
    opacity: 1;
  }
  .scroll-reveal {
    opacity: 1;
    transform: none;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .col {
    padding: 28px 18px;
  }
  .name {
    font-size: 1.5rem;
  }
  .bio {
    font-size: 0.88rem;
  }
  .photo {
    width: 100px;
    height: 100px;
  }
  .connect-pill {
    padding: 6px 12px;
    font-size: 0.72rem;
  }
}
