/* src/styles.css */

/* Design System */
:root {
  --brand-blue: #0b5fbf;
  --glow-cyan: #00e0ff;
  --glow-gold: #ffd54a;
  --dark-bg: #0b0f1a;
  --light-text: #f5f6fb;
  --muted-text: #b2b7c6;
  --sans-font: "Sora", "Trebuchet MS", Helvetica, Arial, sans-serif;
  --serif-font: "Playfair Display", "Times New Roman", serif;
  --max-width: 1400px;
  --sky-top: #0a1634;
  --sky-mid: #2f2b67;
  --sky-warm: #f28143;
  --sky-gold: #f7c45f;
  --frosted-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.4);
}

/* Base & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--dark-bg);
}

body {
  font-family: var(--sans-font);
  font-size: 18px;
  line-height: 1.7;
  color: var(--light-text);
  background-color: var(--dark-bg);
  -webkit-font-smoothing: antialiased;
  padding-top: 80px;
}

body.nav-open {
  overflow: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--serif-font);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(3rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h3 { font-size: 1.5rem; }

a {
  color: var(--glow-gold);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  filter: brightness(1.2);
}

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

.container {
  width: 90%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
}

/* Main Sections */
.section {
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
  --section-fade: transparent;
}

.section::before,
.section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 180px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.9;
}

.section::before {
  top: 0;
  background: linear-gradient(to bottom, var(--section-fade), transparent);
}

.section::after {
  bottom: 0;
  background: linear-gradient(to top, var(--section-fade), transparent);
}

@keyframes fade-in-out {
  0% { opacity: 0; transform: translateY(50px); }
  30%, 70% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-50px); }
}

@supports (animation-timeline: view()) {
  .section {
    animation: fade-in-out linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
}

/* Backgrounds & Overlays */
.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  transition: opacity 1.2s ease;
}

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

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  background: linear-gradient(to top, rgba(11, 15, 26, 0.75), transparent);
  z-index: 1;
  pointer-events: none;
}

.hero .bg-overlay {
  opacity: 1; /* Make background fully visible */
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  z-index: 1;
}

.hero-text {
  flex: 1;
  max-width: 54%;
  background: rgba(10, 16, 34, 0.3);
  border-radius: 24px;
  padding: 1.6rem 1.8rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 50px rgba(5, 10, 22, 0.35);
}

.hero-text h1 {
  font-family: var(--serif-font);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 1rem;
  line-height: 1.1;
  color: var(--light-text);
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.hero-text .intro-bio {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: rgba(245, 246, 251, 0.85);
}

.hero-image {
  flex: 0 0 auto;
  width: 35%;
  max-width: 400px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(5, 10, 22, 0.6);
  filter: brightness(95%) saturate(110%);
  transition: all 0.3s ease;
  object-fit: cover;
  object-position: center 20%;
  height: 520px;
  width: 100%;
}

.hero-image img:hover {
  filter: grayscale(0%) brightness(100%);
  transform: translateY(-5px);
}

.hero-links .cta-button {
  display: inline-block;
  background-color: var(--glow-gold);
  color: var(--dark-bg);
  padding: 0.85rem 2.2rem;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 15px 30px rgba(255, 213, 74, 0.35);
}

.hero-links .cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(255, 213, 74, 0.45);
}

/* Sparkle Effect */
.sparkle-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTAwIiBjeT0iMTAwIiByPSIyIiBmaWxsPSIjRkZGIi8+PC9zdmc+'); /* Tiny white dot */
  background-size: 20px 20px;
  opacity: 0.12;
  animation: sparkle-move 70s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes sparkle-move {
  from { background-position: 0 0; }
  to { background-position: 1000px 1000px; }
}

@media (max-width: 800px) {
  .hero {
    height: auto;
    padding: 8rem 0 4rem;
    text-align: center;
  }

  .hero-content {
    flex-direction: column;
    gap: 2rem;
  }

  .hero-text {
    max-width: 100%;
    padding: 1.5rem;
  }

  .hero-image {
    width: 80%;
    max-width: 300px;
  }
  .hero-image img {
    height: auto;
  }
  .hero-text h1 {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }
  .hero-text .intro-bio {
    font-size: 1rem;
  }
}
/* Navigation Bar */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(8, 12, 22, 0.35);
  backdrop-filter: blur(12px);
  padding: 0.9rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--serif-font);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--light-text);
}

.nav-links {
  display: flex;
  gap: 3rem;
}

.nav-links a {
  font-family: var(--sans-font);
  font-weight: 500;
  font-size: 1rem;
  color: var(--light-text);
  padding-bottom: 0.5rem;
  border-bottom: 4px solid transparent;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  color: var(--glow-gold);
  border-bottom-color: var(--glow-gold);
}

.nav-links a.active {
  color: var(--light-text);
  border-bottom-color: var(--light-text);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--light-text);
  position: relative;
  transition: background 0.2s 0.2s;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 3px;
  background: var(--light-text);
  left: 0;
  transition: transform 0.2s, top 0.2s 0.2s;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
  transition: top 0.2s, transform 0.2s 0.2s;
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
  transition: top 0.2s, transform 0.2s 0.2s;
}

@media (max-width: 800px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 20, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 1.5rem;
  }
}

/* Focus Areas Section */
#focus {
  background-color: #f3f5fb;
  text-align: center;
  --section-fade: rgba(255, 255, 255, 0.9);
}

#focus .bg-overlay {
  background-size: cover;
  background-position: center;
  filter: brightness(1.05);
  opacity: 1;
}

#focus .section-title {
  background: rgba(255, 255, 255, 0.75);
  padding: 0.6rem 1.8rem;
  border-radius: 999px;
  text-shadow: none;
}

#focus .section-subtitle {
  display: none;
}

.data-mesh-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iNSIgY3k9IjUiIHJ9IjEuNSIgZmlsbD0iIzAwRjJGRiIvPjwvc3ZnPg=='); /* Small cyan dot */
  background-size: 40px 40px;
  opacity: 0.25;
  animation: data-mesh-animate 120s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes data-mesh-animate {
  from { background-position: 0 0; }
  to { background-position: 1000px 1000px; }
}

.section-title {
  font-family: var(--serif-font);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 3rem;
  color: #0c1224;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--glow-cyan);
  border-radius: 2px;
}

.section-subtitle {
  font-family: var(--sans-font);
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(12, 18, 36, 0.65);
  margin-top: 4rem;
  margin-bottom: 2rem;
}

.focus-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.focus-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  padding: 2.5rem;
  width: 100%;
  height: 100%;
  min-height: 280px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
  min-width: 0;
  overflow-wrap: break-word;
}

.focus-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.focus-card h3 {
  color: var(--brand-blue);
  font-family: var(--serif-font);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.focus-card p {
  color: rgba(12, 18, 36, 0.8);
  font-size: 1rem;
  line-height: 1.6;
}

.focus-card strong {
  color: #0c1224;
}

/* Current Work */
.current-work {
  margin-top: 6rem;
  padding: 3rem;
  background: rgba(10, 10, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.current-work ul {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
}

.current-work li {
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  padding-left: 25px;
  color: var(--muted-text);
}

.current-work li:last-child {
  border-bottom: none;
}

.current-work li::before {
  content: "»";
  position: absolute;
  left: 0;
  color: var(--glow-gold);
  font-size: 1.2rem;
  line-height: 1;
}
/* Current Work Section */
.current-work-section {
  position: relative;
  overflow: hidden;
  padding-top: 10rem; /* Space for the background to show */
  padding-bottom: 5rem;
  --section-fade: rgba(11, 15, 26, 0.7);
}

.current-work-section .bg-overlay {
  background-attachment: fixed; /* Parallax-like effect */
  opacity: 0.85;
  filter: none;
  z-index: 0;
}

.current-work-section .section-subtitle {
  color: rgba(245, 246, 251, 0.95);
  font-size: clamp(2rem, 3vw, 2.6rem);
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.current-work-section .section-intro,
.current-work-section small {
  color: rgba(245, 246, 251, 0.85);
  font-size: 1.15rem;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.workspace-overlay {
  display: none;
}

.current-work-cards-container {
  background: rgba(13, 20, 36, 0.7);
  border-radius: 15px;
  padding: 3rem;
  margin-top: 3rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 100%;
}

.current-work-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.current-work-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.current-work-cards-container ul {
  list-style: none;
  padding: 0;
}

.current-work-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted-text);
}

.current-work-item:last-child {
  border-bottom: none;
}

.current-work-item span {
  flex-grow: 1;
}

.progress-bar-container {
  width: 150px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  margin-left: 1rem;
}

.progress-bar {
  height: 100%;
  width: 70%;
  background: linear-gradient(to right, var(--glow-cyan), var(--brand-blue));
  border-radius: 6px;
  transition: width 0.5s ease-in-out;
}

@media (max-width: 800px) {
  .current-work-section {
    padding-top: 8rem;
  }
  .workspace-overlay {
    height: 200px;
  }
  .current-work-cards-container {
    padding: 1.5rem;
  }
  .current-work-columns {
    grid-template-columns: 1fr;
  }
  .current-work-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .progress-bar-container {
    width: 100%;
    margin-left: 0;
  }
}

/* Identity Section */
#identity {
  background-color: #0b0f18;
  color: var(--light-text);
  padding: 6rem 0;
  --section-fade: rgba(11, 15, 26, 0.75);
}

#identity .bg-overlay {
  opacity: 0.9;
  filter: brightness(0.75) contrast(1.1);
  background-position: center 25%;
}

.glow-mesh-overlay {
  position: absolute;
  inset: 0;
  background-image: url("floating-network.png");
  background-repeat: no-repeat;
  background-size: 560px auto;
  background-position: right 4% center;
  mix-blend-mode: screen;
  filter: none;
  opacity: 0.95;
  z-index: 1;
  pointer-events: none;
}

#identity .section-title {
  color: var(--light-text);
}

.identity-box {
  background: rgba(9, 14, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 3rem;
  max-width: 780px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.rich-text {
  font-size: 1.05rem;
  color: rgba(245, 246, 251, 0.9);
  line-height: 1.9;
}

/* Blog Section */
#blog {
  background: url("blog.png") center top/cover no-repeat;
  color: #101828;
  --section-fade: rgba(255, 255, 255, 0.9);
}

#blog .container {
  position: relative;
  z-index: 1;
}

#blog .section-title {
  color: #0c1224;
}

.section-intro {
  font-size: 1.1rem;
  color: rgba(12, 18, 36, 0.7);
  margin-bottom: 2.5rem;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.blog-item {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  padding: 0 2rem 2rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.blog-item::before {
  content: "";
  display: block;
  height: 160px;
  margin: 0 -2rem 1.5rem;
  background: linear-gradient(120deg, #e7efff, #ffe8c7);
  background-image: linear-gradient(120deg, #e7efff 0%, #ffe8c7 100%);
}

.blog-item h3 a {
  color: var(--brand-blue);
}

.blog-item .date {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  color: rgba(12, 18, 36, 0.55);
  margin-bottom: 0.5rem;
}

.blog-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

/* Links/Presence Section */
#links {
  background: #070b16;
  color: var(--light-text);
}

#links {
  background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
              url("links-presence.jpg") center top/100% auto no-repeat;
  background-color: #070b16;
  --section-fade: transparent;
  padding: 10rem 0;
  min-height: 70vh;
}

#links .container {
  position: relative;
  z-index: 2;
}

#links .section-title {
  color: var(--light-text);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.link-card {
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 22px;
  padding: 2rem;
  text-align: center;
  box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.25), 0 0 14px rgba(255, 255, 255, 0.15);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.link-card a {
  color: var(--light-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.link-card svg {
  width: 42px;
  height: 42px;
  fill: var(--glow-gold);
}

.link-card span {
  font-size: 1.1rem;
  font-weight: 600;
}

.link-card p {
  margin-top: 1rem;
  color: rgba(245, 246, 251, 0.7);
}

.link-card:hover {
  transform: scale(1.06) translateY(-10px);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.35), 0 0 24px rgba(255, 255, 255, 0.25);
}

/* Contact Section */
#contact {
  background: url("contact-section.jpg") center/cover no-repeat;
  color: var(--light-text);
  --section-fade: rgba(11, 15, 26, 0.75);
  padding: 10rem 0;
  min-height: 70vh;
}

#contact .section-title {
  color: var(--light-text);
}

.contact-card {
  background: rgba(10, 14, 24, 0.65);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 520px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* Footer */
.footer {
  background: #05070f;
  color: rgba(245, 246, 251, 0.6);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

/* Blog Pages */
.blog-hero {
  padding: 10rem 0 4rem;
  background: linear-gradient(180deg, #f4f7ff, #ffffff);
}

.blog-hero h1 {
  color: #0c1224;
  margin-top: 1rem;
}

.blog-post {
  background: #ffffff;
  color: #101828;
  padding-bottom: 6rem;
}

.blog-post article {
  background: #ffffff;
  border-radius: 18px;
  padding: 2.5rem;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

/* Animations */
.hero-text,
.hero-image,
.focus-card,
.current-work-cards-container,
.identity-box,
.blog-item,
.link-card,
.contact-card {
  animation: float-up 0.9s ease both;
}

.focus-card:nth-child(2) { animation-delay: 0.12s; }
.focus-card:nth-child(3) { animation-delay: 0.24s; }
.blog-item:nth-child(2) { animation-delay: 0.1s; }
.blog-item:nth-child(3) { animation-delay: 0.2s; }
.link-card:nth-child(2) { animation-delay: 0.1s; }
.link-card:nth-child(3) { animation-delay: 0.2s; }
.link-card:nth-child(4) { animation-delay: 0.3s; }

@keyframes float-up {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 800px) {
  .nav-links a {
    font-size: 1.5rem;
    padding: 1rem;
    width: 100%;
    text-align: center;
  }

  .hero {
    padding-top: 8rem;
  }

  .hero h1 {
    font-size: 2.8rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-post article {
    padding: 1.8rem;
  }
}

/* Utility to hide old decor */
.page-decor, .hero-frame {
  display: none !important;
}

/* Enhanced Focus Grid Layout - Mobile/Tablet Fixes */
@media (max-width: 900px) {
  .focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .focus-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}