/*--------------------------------------------------------------
  Ayon Aryan — Personal Portfolio
  Rolls-Royce × Apple Design System
--------------------------------------------------------------*/

/* ===== DESIGN TOKENS ===== */
:root {
  --black: #050505;
  --black-rich: #0a0a0a;
  --surface: #0e0e0e;
  --surface-elevated: #141414;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(196,163,90,0.25);
  --gold: #C4A35A;
  --gold-dim: rgba(196,163,90,0.10);
  --gold-glow: rgba(196,163,90,0.20);
  --white: #F5F0E8;
  --white-pure: #ffffff;
  --gray: #6B6B6B;
  --gray-light: #999;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
  scroll-behavior: smooth;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: 80px; }

body {
  font-family: var(--sans);
  background: var(--black);
  color: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-size: 16px;
}

a { color: var(--gold); text-decoration: none; transition: color 0.4s var(--ease); }
a:hover { color: #dfc28e; }

h1, h2, h3, h4, h5, h6 { color: var(--white-pure); line-height: 1.2; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h3, h4, h5, h6 { font-family: var(--sans); font-weight: 500; }

h1 em, h2 em { font-style: italic; color: var(--gold); }

img { max-width: 100%; display: block; }
::selection { background: var(--gold); color: var(--black); }

strong { color: var(--white-pure); font-weight: 600; }

/* ===== CURSOR GLOW ===== */
.cursor-glow {
  position: fixed;
  width: 800px; height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,163,90,0.04) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.6s;
}
.cursor-glow.active { opacity: 1; }
@media (max-width: 768px) { .cursor-glow { display: none; } }

/* ===== PRELOADER ===== */
#preloader {
  position: fixed; inset: 0; z-index: 999999;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s, visibility 0.6s;
}
#preloader::before {
  content: '';
  width: 32px; height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 60px;
  height: 80px;
  display: flex; align-items: center;
  background: rgba(5,5,5,0.6);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.5s var(--ease-luxury);
}
.navbar.hidden { transform: translateY(-100%); }

.navbar-inner {
  display: flex; align-items: center;
  width: 100%; max-width: 1300px; margin: 0 auto;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--white-pure) !important;
  letter-spacing: 0.5px;
  margin-right: auto;
}
.nav-logo:hover { color: var(--gold) !important; }

.nav-links {
  list-style: none;
  display: flex; gap: 40px;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--gray-light);
  font-size: 13px; font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.4s;
}
.nav-links a:hover, .nav-links a.active { color: var(--white-pure); }

.nav-cta {
  margin-left: 48px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold) !important;
  padding: 10px 24px;
  border: 1px solid var(--gold);
  border-radius: 0;
  transition: all 0.4s var(--ease);
}
.nav-cta:hover {
  background: var(--gold);
  color: var(--black) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column; gap: 6px;
  background: none; border: none;
  cursor: pointer; padding: 8px;
  margin-left: 20px;
}
.nav-toggle span {
  display: block; width: 24px; height: 1px;
  background: var(--white-pure);
  transition: 0.3s;
}

@media (max-width: 991px) {
  .navbar { padding: 0 24px; }
  .nav-links {
    position: fixed; top: 80px; left: 0; right: 0;
    background: rgba(5,5,5,0.97);
    backdrop-filter: blur(40px);
    flex-direction: column;
    padding: 40px 24px; gap: 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform 0.5s var(--ease-luxury);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { font-size: 14px; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-toggle.active span:first-child { transform: rotate(45deg) translate(4px, 4px); }
  .nav-toggle.active span:last-child { transform: rotate(-45deg) translate(4px, -4px); }
}

/* ===== SECTIONS ===== */
.section { padding: 140px 0; position: relative; }
.section-dark { background: var(--surface); }

@media (max-width: 768px) { .section { padding: 100px 0; } }

.section-eyebrow {
  font-family: var(--sans);
  font-size: 11px; font-weight: 500;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 52px;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 40px;
  letter-spacing: -0.5px;
}

@media (max-width: 768px) {
  .section-title { font-size: 36px; }
}

.body-text {
  font-size: 16px;
  color: var(--gray-light);
  line-height: 1.9;
  margin-bottom: 20px;
  max-width: 600px;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

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

.hero-content { max-width: 800px; }

.hero-eyebrow {
  font-size: 12px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-title {
  font-size: 86px;
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 32px;
  letter-spacing: -2px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--gray-light);
  line-height: 1.8;
  max-width: 560px;
  margin-bottom: 48px;
}

.hero-actions { display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 768px) {
  .hero-title { font-size: 48px; letter-spacing: -1px; }
  .hero-subtitle { font-size: 16px; }
}

/* Scroll Line */
.scroll-line {
  position: absolute; bottom: 48px; left: 50%;
  transform: translateX(-50%); z-index: 10;
}
.scroll-line span {
  display: block; width: 1px; height: 60px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.2; transform: scaleY(0.5); }
}
@media (max-width: 768px) { .scroll-line { display: none; } }

/* ===== BUTTONS ===== */
.btn-gold {
  display: inline-block;
  padding: 16px 40px;
  font-size: 12px; font-weight: 500;
  font-family: var(--sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--black);
  background: var(--gold);
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: all 0.4s var(--ease);
}
.btn-gold:hover {
  background: transparent;
  color: var(--gold);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-block;
  padding: 16px 40px;
  font-size: 12px; font-weight: 500;
  font-family: var(--sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.4s var(--ease);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

/* ===== ABOUT ===== */
.about-portrait {
  position: relative;
  max-width: 400px;
}
.about-portrait::before {
  content: '';
  position: absolute;
  top: -8px; left: -8px; right: 8px; bottom: 8px;
  border: 1px solid var(--gold);
  z-index: 0;
}
.about-portrait img {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  z-index: 1;
  filter: grayscale(30%) contrast(1.05);
}

.about-metrics {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 48px 0 0;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.metric {
  display: flex; flex-direction: column;
  padding: 0 32px;
}
.metric:first-child { padding-left: 0; }
.metric-value {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.metric-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.metric-divider {
  width: 1px; height: 40px;
  background: var(--border);
}

@media (max-width: 768px) {
  .about-metrics { gap: 24px; }
  .metric { padding: 12px 0; }
  .metric-divider { display: none; }
}

/* ===== EXPERTISE ===== */
.section-dark .about-bg {
  position: absolute; inset: 0; z-index: 0;
}
.section-dark .about-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.15;
}
.section-dark .container { position: relative; z-index: 1; }

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin-top: 60px;
  border: 1px solid var(--border);
}

.expertise-card {
  background: var(--surface);
  padding: 48px 40px;
  transition: background 0.4s var(--ease);
}
.expertise-card:hover { background: var(--surface-elevated); }

.expertise-number {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--gold);
  display: block;
  margin-bottom: 24px;
  font-style: italic;
}

.expertise-card h3 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.expertise-card p {
  font-size: 14px;
  color: var(--gray-light);
  line-height: 1.8;
  margin-bottom: 20px;
}

.expertise-stack {
  font-size: 11px;
  color: var(--gray);
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.8;
}

@media (max-width: 991px) {
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .expertise-grid { grid-template-columns: 1fr; }
  .expertise-card { padding: 36px 28px; }
}

/* ===== CAREER ===== */
.career-timeline {
  max-width: 800px;
  margin-top: 60px;
}

.career-entry {
  display: flex;
  gap: 48px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.career-entry:first-child { padding-top: 0; }

.career-period {
  font-size: 12px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  min-width: 160px;
  padding-top: 4px;
  white-space: nowrap;
}

.career-content h3 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 4px;
}

.career-org {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 16px;
}

.career-desc {
  font-size: 14px;
  color: var(--gray-light);
  line-height: 1.8;
}

@media (max-width: 768px) {
  .career-entry { flex-direction: column; gap: 8px; }
  .career-period { min-width: auto; }
}

.subsection-heading {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 32px;
}

.education-entry {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.education-entry:last-child { border-bottom: none; margin-bottom: 0; }

.education-entry h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

/* ===== PORTFOLIO / WORK ===== */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 60px;
}
.portfolio-filters button {
  padding: 10px 24px;
  font-size: 12px; font-weight: 500;
  font-family: var(--sans);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
}
.portfolio-filters button:hover { color: var(--white-pure); }
.portfolio-filters button.filter-active {
  color: var(--gold);
  border-color: var(--gold);
}

.work-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.5s var(--ease-luxury), border-color 0.4s;
}
.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
}

.work-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}
.work-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-luxury);
  filter: grayscale(20%);
}
.work-card:hover .work-img img {
  transform: scale(1.04);
  filter: grayscale(0%);
}

.work-overlay {
  position: absolute; inset: 0;
  background: rgba(5,5,5,0.7);
  display: flex;
  align-items: center; justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.4s;
}
.work-card:hover .work-overlay { opacity: 1; }

.work-overlay a {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white-pure);
  font-size: 18px;
  transition: all 0.3s;
}
.work-overlay a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

.work-detail { padding: 28px 32px 32px; }

.work-category {
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.work-detail h3 {
  font-size: 20px;
  font-weight: 500;
  margin: 10px 0 12px;
}

.work-detail p {
  font-size: 14px;
  color: var(--gray-light);
  line-height: 1.7;
  margin-bottom: 16px;
}

.work-stack {
  font-size: 11px;
  color: var(--gray);
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.8;
}

/* ===== CONTACT ===== */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--gray-light);
  font-size: 15px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.3s, border-color 0.3s;
}
.contact-link:hover {
  color: var(--white-pure);
  border-bottom-color: var(--gold);
}
.contact-link i {
  font-size: 20px;
  color: var(--gold);
  width: 24px;
}

.contact-form .form-group {
  margin-bottom: 24px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 16px 0;
  font-size: 15px;
  font-family: var(--sans);
  color: var(--white);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  transition: border-color 0.4s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--gray);
  font-weight: 300;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-bottom-color: var(--gold);
}
.contact-form textarea { resize: vertical; min-height: 100px; }

/* ===== FOOTER ===== */
.footer {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.footer-logo {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--white-pure);
}
.footer-inner p {
  font-size: 12px;
  color: var(--gray);
  margin: 0;
  letter-spacing: 1px;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  color: var(--gray);
  font-size: 18px;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--gold); }

/* ===== SCROLL TOP ===== */
.scroll-top-btn {
  position: fixed; right: 32px; bottom: -60px;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 18px;
  z-index: 999;
  transition: all 0.5s var(--ease-luxury);
  opacity: 0; visibility: hidden;
}
.scroll-top-btn.active {
  bottom: 32px;
  opacity: 1; visibility: visible;
}
.scroll-top-btn:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

/* ===== RESPONSIVE CONTAINER ===== */
@media (max-width: 768px) {
  .container { padding-left: 24px; padding-right: 24px; }
}

/* ===== CASE STUDY PAGES ===== */
.case-hero {
  padding: 160px 0 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 48px;
  transition: color 0.3s;
}
.back-link:hover { color: var(--gold); }

.case-title {
  font-family: var(--serif);
  font-size: 72px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1.5px;
}

.case-subtitle {
  font-size: 18px;
  color: var(--gray-light);
  line-height: 1.8;
  max-width: 640px;
  margin-bottom: 48px;
}

.case-meta {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.case-meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-meta-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.case-meta-value {
  font-size: 14px;
  color: var(--gray-light);
}

.case-hero-img {
  max-width: 1200px;
  margin: 0 auto 0;
  padding: 0 24px;
}

.case-hero-img img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border: 1px solid var(--border);
}

.case-section {
  padding: 120px 0;
}

.case-heading {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 24px;
}

.arch-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.arch-item {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
.arch-item:first-child { padding-top: 0; }
.arch-item:last-child { border-bottom: none; }

.arch-item h4 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.arch-item p {
  font-size: 14px;
  color: var(--gray-light);
  line-height: 1.8;
  margin: 0;
}

.case-nav {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

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

.case-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: opacity 0.3s;
}
.case-nav-link:hover { opacity: 0.7; }

.case-nav-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.case-nav-title {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--white-pure);
}

.case-nav-next { text-align: right; }

/* Case Study Link on Index Cards */
.work-case-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s;
}
.work-card:hover .work-case-link {
  opacity: 1;
  transform: translateY(0);
}
.work-case-link:hover {
  color: #dfc28e;
}

@media (max-width: 768px) {
  .case-title { font-size: 44px; }
  .case-heading { font-size: 32px; }
  .case-meta { gap: 24px; }
  .case-section { padding: 80px 0; }
  .arch-item { flex-direction: column; gap: 8px; }
  .work-case-link { opacity: 1; transform: translateY(0); }
}

/* ===== AOS OVERRIDE ===== */
[data-aos="fade-up"] { transform: translate3d(0, 40px, 0); }

