/* === Theme Variables === */
:root{
  --tomato:#ff6347;
  --blue:#007bff;
  --white:#ffffff;
  --ink:#111;
  --text:#222;
  --muted:#777;
  --grad-gray: linear-gradient(180deg, #f7f7f7 0%, #ececec 100%);
  --page-w: 85vw; /* requested page width */
}

/* === General Layout === */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  background-color: var(--white);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: inherit; }

h1, h2, h3, h4 { color: var(--ink); font-weight: 600; margin-bottom: 10px; }

/* Offset for fixed header when linking via hash */
section { scroll-margin-top: 110px; }

/* === Links === */
a {
  color: var(--ink);
  text-decoration: none;
  position: relative;
  transition: color 0.25s ease;
  font-weight: 500;
}
a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  left: 0;
  bottom: -3px;
  background: linear-gradient(90deg, var(--tomato), var(--blue));
  transition: width 0.25s ease;
}
a:hover { color: #333; }
a:hover::after { width: 100%; }

/* === Page width (85% of screen) === */
.section {
  padding: 1em 0;
  width: var(--page-w);
  max-width: var(--page-w);
  margin: 1em auto; /* adds space between sections */
  position: relative;
}

/* === Section backgrounds === */
.section--light,
.section--white { background: var(--white); }

.section--gray {
  background: var(--grad-gray);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0,0,0,0.03);
  padding-left: 30px;
  padding-right: 30px;
}

/* Titles */
.section-title{
  position: relative;
  padding-bottom: 8px;
  margin-bottom: 22px;
}
.section-title::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  height:4px;
  width:96px;
  background: linear-gradient(90deg, var(--tomato), var(--blue));
  border-radius: 3px;
}
.section-title--accent-blue::after{ background: linear-gradient(90deg, var(--blue), var(--tomato)); }
.section-title--accent-tomato::after{ background: linear-gradient(90deg, var(--tomato), var(--blue)); }

/* === Header === */
header.glass {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 14px;
  padding-inline: max(2vw, calc((100vw - var(--page-w)) / 2));
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  z-index: 1000;
}

/* Name at top: BLACK */
.brand { font-size: 1.4em; font-weight: 800; color: var(--ink); }

nav a { margin-left: 24px; color: #444; font-weight: 600; position: relative; }
nav a:hover { color: var(--ink); }
nav a::after { height: 3px; bottom: -10px; border-radius: 2px; }

/* === About === */
/* Smaller gap between DP and About text */
.about-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;            /* was 40px -> tighter */
  align-items: center;
  justify-content: center;
}

.about-left { flex: 1 1 1em; display: flex; justify-content: center; }
.profile-pic {
  width: 100%; max-width: 380px; height: auto; border-radius: 14px; object-fit: cover;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12); border: 2px solid rgba(0,0,0,0.04);
}
.about-right { flex: 2 1 2em; max-width: 720px; }

/* === Reel: hide scrollbar === */
.scroll-reel {
  overflow: hidden;
  margin-top: 28px;
  width: 100%;
  height: 12em;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
}
.scroll-reel { scrollbar-width: none; }
.scroll-reel::-webkit-scrollbar { display: none; }
.reel-track {
  display: flex;
  width: max-content;
  animation: scroll 300s linear infinite;
}
.reel-track img {
  height: 10em;
  margin-right: 16px;
  border-radius: 8px;
  border: 2px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* === Timeline / Experience === */
.timeline { position: relative; padding-left: 52px; margin-left: 8px; border-radius: 12px; }
.timeline::before {
  content: ''; position: absolute; top: 0; left: 24px; width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--blue) 0%, var(--tomato) 100%);
  z-index: 1; border-radius: 4px;
}
.timeline-item { position: relative; margin-bottom: 44px; padding-left: 30px; }
.timeline-item::before {
  content: ''; position: absolute; left: -16px; top: 4px; width: 20px; height: 20px;
  background: radial-gradient(circle at 30% 30%, #ff8a74 0%, var(--tomato) 60%, #cc3f29 100%);
  border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.15); z-index: 2;
}
.timeline-content {
  background: #ffffff; padding: 16px 20px; border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0,0,0,0.06);
}
.timeline-content:hover { transform: translateY(-8px); box-shadow: 0 16px 32px rgba(0,0,0,0.10); }

/* Increase gap between "Experience" title and gray boundary */
#experience.section { padding-top: 1em; }   /* was 60px via .section */

/* Clickable experience card state when blanked */
.exp-card { cursor: pointer; }
.exp-card.exp-blank { background: #fff; min-height: 72px; }

/* === Education === */
.education-container { display: flex; flex-direction: column; gap: 1em; }
.edu-entry {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  padding: 14px 16px; border-radius: 12px; background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}
.edu-entry h3 { margin-bottom: -4px; }
.edu-entry img { height: 64px; border-radius: 6px; flex-shrink: 0; border: 1px solid rgba(0,0,0,0.08); }

/* === Contact Icons === */
.contact-icons{ display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.icon-btn{
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: #fff; color: #111;
  border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 8px 18px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover{ transform: translateY(-3px); box-shadow: 0 14px 28px rgba(0,0,0,0.12); color: var(--blue); border-color: rgba(0,0,0,0.12); }

/* === Expander overlay & animation === */
.expander-overlay{
  position: fixed; inset: 0; z-index: 2000;
  display: block; background: rgba(0,0,0,0.15);
  backdrop-filter: blur(6px); /* blur the rest of the page */
  opacity: 0; pointer-events: none;
  transition: opacity 350ms ease;       /* slower fade */
}
.expander-overlay.show{ opacity: 1; pointer-events: auto; }

/* Blur fallback on main content */
#main-content.blurred{ filter: blur(4px); }

/* The expanding panel — slower animation */
.expander{
  position: fixed; z-index: 2100; background: #fff; border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  overflow: hidden; border: 1px solid rgba(0,0,0,0.08);
  transition: top 600ms ease, left 600ms ease, width 600ms ease, height 600ms ease, transform 600ms ease; /* was 280ms */
}

/* Target size/position (centered) */
.expander.to-center{
  top: 8vh !important; left: 50% !important; transform: translateX(-50%) !important;
  width: min(880px, 90vw) !important; height: min(80vh, 720px) !important;
}

/* Content once loaded */
.expander.loaded{ display: grid; grid-template-rows: auto 1fr; }

.expander-img{
  width: 100%; height: auto; max-height: 15em; object-fit: cover; display: block; overflow: hidden;
  background: #f2f2f2;
  align-self: center;
}
.expander-body{
  padding: 18px 20px; color: #222; overflow: auto; line-height: 1.7;
}

/* === Matrix Loader === */
#loading-screen { position: fixed; z-index: 10000; width: 100vw; height: 100vh; background: black; }
#matrix { width: 100%; height: 100%; display: block; background: black; }

/* === Responsive tweaks === */
@media (max-width: 1024px){ :root { --page-w: 88vw; } }
@media (max-width: 720px){
  :root { --page-w: 92vw; }
  .brand{ font-size: 1.2em; }
  nav a{ margin-left: 16px; }
  .expander-img{ height: 220px; }
}
