/* ============================================================================
   Portfolio — glassmorphic dark theme (gold → white on near-black).
   Design tokens live in :root below. To re-skin the whole site, change
   --accent-1 / --accent-2 (and --accent-gradient) and everything follows.
   You normally edit content in assets/js/data.js, not this file.
============================================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  /* Primary gradient: gold → champagne */
  --accent-1: #d4af37;
  --accent-2: #f5d67a;
  --accent-gradient: linear-gradient(135deg, #d4af37, #f5d67a);
  --accent-gradient-r: linear-gradient(135deg, #f5d67a, #d4af37);
  --accent-glow: 0 0 20px rgba(212, 175, 55, 0.35), 0 0 40px rgba(245, 214, 122, 0.18);

  --gold: hsl(45, 100%, 65%);

  /* Backgrounds */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(18, 18, 28, 0.75);
  --bg-glass: rgba(18, 18, 28, 0.4);
  --bg-gradient-card: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(245, 214, 122, 0.05) 100%);

  /* Borders */
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(212, 175, 55, 0.35);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #a0a0b8;
  --text-muted: #606078;
  --text-accent: #d4af37;

  /* Typography */
  --ff-primary: "Inter", "Poppins", sans-serif;
  --ff-mono: "Fira Code", monospace;

  --fs-hero: clamp(2.5rem, 6vw, 4.5rem);
  --fs-h1: clamp(1.5rem, 3vw, 2rem);
  --fs-h2: clamp(1.25rem, 2.5vw, 1.75rem);
  --fs-h3: clamp(1rem, 2vw, 1.25rem);
  --fs-body: 0.938rem;
  --fs-small: 0.813rem;
  --fs-xs: 0.75rem;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 900;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(212, 175, 55, 0.1);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
a { text-decoration: none; }
li { list-style: none; }
img, ion-icon, a, button, time, span { display: block; }
button { font: inherit; background: none; border: none; text-align: left; cursor: pointer; }
input, textarea { display: block; width: 100%; background: none; font: inherit; }
::selection { background: var(--accent-1); color: var(--bg-primary); }
:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 2px; }

html { font-family: var(--ff-primary); scroll-behavior: smooth; }
body { background: var(--bg-primary); color: var(--text-primary); overflow-x: hidden; }

/* Accessibility: skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent-1);
  color: #001018;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: var(--fw-semibold);
}
.skip-link:focus { left: 0; }

/* ===== PARTICLE CANVAS ===== */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ===== LAYOUT ===== */
main {
  position: relative;
  z-index: 1;
  margin: 15px 12px;
  margin-bottom: 75px;
  min-width: 259px;
}

/* ===== COMMON ELEMENTS ===== */
.sidebar, article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 15px;
  position: relative;
  z-index: 1;
}
.separator { width: 100%; height: 1px; background: var(--border); margin: 16px 0; }

.icon-box {
  position: relative;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(245, 214, 122, 0.15));
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  color: var(--accent-1);
  box-shadow: var(--shadow-sm);
  z-index: 1;
}
.icon-box::before { content: ""; position: absolute; inset: 1px; background: var(--bg-secondary); border-radius: inherit; z-index: -1; }
.icon-box ion-icon { --ionicon-stroke-width: 35px; }

article { display: none; }
article.active { display: block; animation: fadeIn 0.5s ease backwards; }
@keyframes fadeIn { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }

/* ===== HEADINGS ===== */
.h2, .h3, .h4, .h5 { color: var(--text-primary); text-transform: capitalize; }
.h2 { font-size: var(--fs-h1); font-weight: var(--fw-bold); }
.h3 { font-size: var(--fs-h2); font-weight: var(--fw-semibold); }
.h4 { font-size: var(--fs-h3); font-weight: var(--fw-medium); }
.h5 { font-size: var(--fs-small); font-weight: var(--fw-medium); }

.article-title { position: relative; padding-bottom: 10px; margin-bottom: 25px; }
.article-title::after {
  content: ""; position: absolute; bottom: 0; left: 0;
  width: 40px; height: 3px; background: var(--accent-gradient); border-radius: 3px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: var(--accent-gradient);
  color: #0a0a0f;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  border-radius: var(--radius-full);
  border: none; cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  text-decoration: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--text-primary);
  font-weight: var(--fw-medium);
  font-size: var(--fs-small);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-hover);
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
}
.btn-secondary:hover { border-color: var(--accent-1); color: var(--accent-1); transform: translateY(-2px); }

/* ===== SIDEBAR ===== */
.sidebar { margin-bottom: 15px; max-height: 112px; overflow: hidden; transition: var(--transition-slow); }
.sidebar.active { max-height: 500px; }

.sidebar-info { position: relative; display: flex; justify-content: flex-start; align-items: center; gap: 15px; }

.avatar-box { background: var(--accent-gradient); border-radius: var(--radius-lg); padding: 3px; }
.avatar-box img { border-radius: calc(var(--radius-lg) - 3px); display: block; width: 80px; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 20%; }

.info-content .name {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: var(--fw-semibold);
  letter-spacing: -0.25px;
  margin-bottom: 8px;
}
.info-content .title {
  color: var(--accent-1);
  background: rgba(212, 175, 55, 0.1);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  width: max-content;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.info-more-btn {
  position: absolute; top: -15px; right: -15px;
  border-radius: 0 var(--radius-lg);
  font-size: 13px;
  color: var(--accent-1);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(245, 214, 122, 0.15));
  padding: 10px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  z-index: 1;
}
.info-more-btn::before {
  content: ""; position: absolute; inset: 1px; border-radius: inherit;
  background: var(--bg-secondary); transition: var(--transition-fast); z-index: -1;
}
.info-more-btn:hover { background: var(--accent-gradient); }
.info-more-btn:hover::before { background: rgba(212, 175, 55, 0.1); }
.info-more-btn span { display: none; }

.sidebar-info-more { opacity: 0; visibility: hidden; transition: var(--transition-slow); }
.sidebar.active .sidebar-info-more { opacity: 1; visibility: visible; }

.contacts-list { display: grid; grid-template-columns: 1fr; gap: 16px; }
.contact-item { min-width: 100%; display: flex; align-items: center; gap: 16px; }
.contact-info { max-width: calc(100% - 46px); width: calc(100% - 46px); }
.contact-info :is(.contact-link, time, address) { color: var(--text-secondary); font-size: var(--fs-small); }
.contact-info address { font-style: normal; }
.contact-title {
  color: var(--text-muted); font-size: var(--fs-xs); text-transform: uppercase;
  margin-bottom: 2px; letter-spacing: 0.5px;
}

.social-list { display: flex; justify-content: flex-start; align-items: center; gap: 15px; padding-bottom: 4px; padding-left: 7px; }
.social-item .social-link { color: var(--text-muted); font-size: 18px; transition: var(--transition-fast); }
.social-item .social-link:hover { color: var(--accent-1); }

/* Tooltip social (e.g. Discord) */
.social-link2 { position: relative; cursor: pointer; color: var(--text-muted); font-size: 18px; transition: var(--transition-fast); }
.social-link2:hover { color: var(--accent-1); }
.tooltip {
  visibility: hidden; opacity: 0; width: max-content;
  background: var(--bg-secondary); color: var(--text-primary); text-align: center;
  padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  position: absolute; top: 125%; left: 50%; transform: translateX(-50%);
  transition: opacity 0.3s; white-space: nowrap; font-size: var(--fs-xs); z-index: 10;
}
.social-link2:hover .tooltip { visibility: visible; opacity: 1; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; bottom: 0; left: 0; width: 100%;
  background: rgba(10, 10, 15, 0.85);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 100;
}
.navbar-list { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; padding: 0 5px; }
.navbar-link { color: var(--text-muted); font-size: 11px; padding: 16px 6px; transition: color var(--transition-fast); font-weight: var(--fw-medium); white-space: nowrap; }
.navbar-link:hover { color: var(--text-secondary); }
.navbar-link.active { color: var(--accent-1); }

/* ===== HERO ===== */
.hero-section { padding: 40px 0 30px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2); border-radius: var(--radius-full);
  font-size: var(--fs-xs); color: var(--accent-1); margin-bottom: 24px;
  animation: pulse-badge 2s ease-in-out infinite;
}
.hero-badge-dot { width: 8px; height: 8px; background: var(--accent-1); border-radius: 50%; animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-badge { 0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.1); } 50% { box-shadow: 0 0 0 8px rgba(212, 175, 55, 0); } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.hero-greeting { font-size: var(--fs-body); color: var(--text-secondary); margin-bottom: 8px; font-weight: var(--fw-regular); }
.hero-name { font-size: var(--fs-hero); font-weight: var(--fw-black); letter-spacing: -2px; line-height: 1.1; margin-bottom: 16px; }
.gradient-text { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.hero-subtitle-wrap {
  display: flex; align-items: center; justify-content: center; gap: 0;
  font-size: clamp(1rem, 2.5vw, 1.5rem); font-weight: var(--fw-medium);
  margin-bottom: 20px; min-height: 2em;
}
.hero-subtitle-static { color: var(--text-secondary); }
.hero-subtitle-rotate { color: var(--accent-1); }
.hero-cursor { color: var(--accent-1); animation: blink-cursor 0.8s step-end infinite; font-weight: var(--fw-light); }
@keyframes blink-cursor { 50% { opacity: 0; } }

.hero-description { font-size: var(--fs-body); color: var(--text-secondary); line-height: 1.7; max-width: 650px; margin: 0 auto 30px; font-weight: var(--fw-light); }
.hero-description strong { color: var(--text-primary); font-weight: var(--fw-semibold); }

.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 500px; margin: 0 auto 30px; }
.hero-stat { background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 12px; text-align: center; transition: var(--transition-base); }
.hero-stat:hover { border-color: var(--border-glow); box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.hero-stat-number { font-size: 1.5rem; font-weight: var(--fw-bold); color: var(--accent-1); display: block; margin-bottom: 4px; }
.hero-stat-trophy { font-size: 1.25rem; }
.hero-stat-label { font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== ABOUT ===== */
.about .article-title { margin-top: 0; }
.about-text { color: var(--text-secondary); font-size: var(--fs-body); font-weight: var(--fw-light); line-height: 1.7; }
.about-text p { margin-bottom: 15px; text-align: justify; padding: 0 5px; }
.about-text strong { color: var(--text-primary); font-weight: var(--fw-medium); }

/* Code bio terminal card */
.code-bio {
  background: #0d1117; color: #e6edf3; font-family: var(--ff-mono);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md);
  position: relative; border: 1px solid rgba(255, 255, 255, 0.06); margin: 20px 0;
}
.code-bio pre { margin: 0; padding: 40px 16px 16px; overflow-x: auto; white-space: pre; }
.code-bio::before {
  content: ""; position: absolute; top: 12px; left: 14px; width: 10px; height: 10px;
  border-radius: 50%; background: #ff5f56; box-shadow: 18px 0 #ffbd2e, 36px 0 #27c93f;
}
.code-bio code { font-size: 13px; line-height: 1.6; display: block; min-width: 100%; }
.code-lang-tag { position: absolute; top: 8px; right: 14px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); font-family: var(--ff-mono); }
.code-lang-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* ===== SERVICES ===== */
.service { margin-bottom: 35px; }
.service-title { margin: 25px 0; }
.service-list { display: grid; grid-template-columns: 1fr; gap: 16px; }
.service-item {
  position: relative; background: var(--bg-glass); padding: 24px;
  border-radius: var(--radius-md); border: 1px solid var(--border);
  transition: var(--transition-base); display: flex; align-items: flex-start; gap: 16px;
}
.service-item:hover { border-color: var(--border-glow); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.service-icon-box { flex-shrink: 0; margin-top: 4px; }
.service-content-box { text-align: left; }
.service-item-title { margin-bottom: 6px; }
.service-item-text { color: var(--text-secondary); font-size: var(--fs-small); font-weight: var(--fw-light); line-height: 1.6; }

/* ===== ACHIEVEMENTS ===== */
.achievements { margin-bottom: 35px; }
.achievements-title { margin-bottom: 20px; }
.achievements-list { display: grid; grid-template-columns: 1fr; gap: 16px; }
.achievement-card {
  display: flex; align-items: flex-start; gap: 16px; background: var(--bg-glass);
  border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; transition: var(--transition-base);
}
.achievement-card:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.achievement-avatar { flex-shrink: 0; width: 50px; height: 50px; border-radius: var(--radius-sm); overflow: hidden; }
.achievement-avatar img { width: 100%; height: 100%; object-fit: cover; }
.achievement-avatar.achievement-emoji {
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(245, 214, 122, 0.15));
  border: 1px solid var(--border);
}
.achievement-title { font-size: var(--fs-body); margin-bottom: 4px; }
.achievement-date { font-size: var(--fs-xs); color: var(--accent-1); margin-bottom: 8px; font-weight: var(--fw-medium); }
.achievement-text { font-size: var(--fs-small); color: var(--text-secondary); font-weight: var(--fw-light); line-height: 1.5; }

/* ===== TECH STACK ===== */
.tech-stack { margin-bottom: 20px; }
.tech-stack-title { margin-bottom: 20px; }
.tech-categories { display: grid; gap: 20px; }
.tech-category { background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.tech-category-label { font-size: var(--fs-xs); color: var(--accent-1); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; font-weight: var(--fw-semibold); }
.tech-icons { display: flex; flex-wrap: wrap; gap: 12px; }
.tech-icon-item {
  position: relative; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: var(--transition-base); cursor: default;
}
.tech-icon-item:hover { border-color: var(--border-glow); transform: translateY(-4px) scale(1.1); box-shadow: var(--shadow-glow); }
.tech-icon-item img { filter: grayscale(0.3); transition: var(--transition-base); border-radius: 4px; }
.tech-icon-item:hover img { filter: grayscale(0); }
.tech-icon-item[data-tooltip]::after {
  content: attr(data-tooltip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  padding: 4px 8px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 6px;
  font-size: 11px; color: var(--text-primary); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 10;
}
.tech-icon-item:hover::after { opacity: 1; }

/* ===== RESUME ===== */
.resume .article-title { margin-bottom: 20px; }
.resume-download { text-align: center; margin-bottom: 30px; }
.timeline { margin-bottom: 30px; }
.timeline .title-wrapper { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.timeline-list { font-size: var(--fs-body); margin-left: 45px; }
.timeline-list span { color: var(--accent-1); font-weight: var(--fw-regular); font-size: var(--fs-small); line-height: 1.6; }
.timeline-company { color: var(--text-secondary) !important; font-style: italic; font-size: var(--fs-small) !important; }
.timeline-item { position: relative; }
.timeline-item:not(:last-child) { margin-bottom: 20px; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; top: -25px; left: -30px; width: 1px; height: calc(100% + 50px); background: var(--border); }
.timeline-item::after { content: ""; position: absolute; top: 5px; left: -33px; height: 6px; width: 6px; border-radius: 50%; background: var(--accent-gradient); box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15); }
.timeline-item-title { font-size: var(--fs-body); line-height: 1.3; margin-bottom: 5px; }
.timeline-text { color: var(--text-secondary); font-weight: var(--fw-light); line-height: 1.6; text-align: justify; }
.timeline-text strong { color: var(--text-primary); font-weight: var(--fw-medium); }
.timeline-coursework { font-size: var(--fs-small); margin-top: 6px; }
.timeline-bullets { list-style: none; padding: 0; margin-top: 8px; }
.timeline-bullets li { position: relative; padding-left: 16px; margin-bottom: 6px; color: var(--text-secondary); font-weight: var(--fw-light); font-size: var(--fs-small); line-height: 1.6; }
.timeline-bullets li::before { content: "›"; position: absolute; left: 0; color: var(--accent-1); font-weight: var(--fw-bold); }
.timeline-bullets li strong { color: var(--text-primary); font-weight: var(--fw-medium); }

/* ===== PROJECTS ===== */
.filter-list { display: none; }
.filter-select-box { position: relative; margin-bottom: 25px; }
.filter-select {
  background: var(--bg-secondary); color: var(--text-secondary);
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: var(--fs-body); font-weight: var(--fw-light);
}
.filter-select.active .select-icon { transform: rotate(0.5turn); }
.select-list {
  background: var(--bg-secondary); position: absolute; top: calc(100% + 6px); width: 100%;
  padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-md); z-index: 2;
  visibility: hidden; pointer-events: none; transition: var(--transition-base);
}
.filter-select.active + .select-list { opacity: 1; visibility: visible; pointer-events: all; }
.select-item button { background: var(--bg-secondary); color: var(--text-secondary); font-size: var(--fs-body); font-weight: var(--fw-light); text-transform: capitalize; width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); }
.select-item button:hover { background: rgba(212, 175, 55, 0.08); color: var(--accent-1); }

.project-list { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 10px; }
.project-item { display: none; }
.project-item.active { display: block; animation: scaleUp 0.3s ease forwards; }
@keyframes scaleUp { 0% { transform: scale(0.95); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.project-card { background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition-base); }
.project-card:hover { border-color: var(--border-glow); box-shadow: var(--shadow-glow); transform: translateY(-3px); }
.project-img { position: relative; width: 100%; height: 180px; overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .project-img img { transform: scale(1.05); }
.project-img-placeholder { display: flex; align-items: center; justify-content: center; min-height: 170px; background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(245, 214, 122, 0.08)); }
.project-placeholder-icon { font-size: 3rem; display: flex; align-items: center; justify-content: center; }

.project-info { padding: 20px; }
.project-title { color: var(--text-primary); font-size: var(--fs-h3); font-weight: var(--fw-semibold); margin-bottom: 4px; }
.project-subtitle { color: var(--text-muted); font-size: var(--fs-small); margin-bottom: 12px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { font-size: 11px; padding: 3px 10px; background: rgba(212, 175, 55, 0.08); color: var(--accent-1); border-radius: var(--radius-full); border: 1px solid rgba(212, 175, 55, 0.15); font-weight: var(--fw-medium); }
.project-expand-btn { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: var(--fs-small); padding: 6px 0; transition: var(--transition-fast); cursor: pointer; border: none; background: none; }
.project-expand-btn:hover { color: var(--accent-1); }
.project-expand-btn ion-icon { transition: transform 0.3s; }
.project-expand-btn.active ion-icon { transform: rotate(180deg); }

.project-details { max-height: 0; overflow: hidden; transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.project-details.active { max-height: 700px; }
.project-details-inner { padding: 16px 20px 20px; border-top: 1px solid var(--border); }
.project-impact, .project-architecture { margin-bottom: 16px; }
.project-impact h4, .project-architecture h4 { font-size: var(--fs-small); color: var(--accent-1); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; font-weight: var(--fw-semibold); }
.project-impact ul { padding: 0; }
.project-impact li { padding: 4px 0; font-size: var(--fs-small); color: var(--text-secondary); line-height: 1.5; }
.project-impact li strong { color: var(--text-primary); }
.project-architecture p { font-size: var(--fs-small); color: var(--text-secondary); line-height: 1.6; font-weight: var(--fw-light); }
.project-links { display: flex; gap: 10px; flex-wrap: wrap; }
.project-link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; font-size: var(--fs-xs); color: var(--text-primary); background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-full); transition: var(--transition-fast); text-decoration: none; }
.project-link-btn:hover { border-color: var(--accent-1); color: var(--accent-1); }

/* ===== BLOG ===== */
.blog-posts { margin-bottom: 10px; }
.blog-follow { text-align: center; margin-bottom: 25px; }
.blog-posts-list { display: grid; grid-template-columns: 1fr; gap: 20px; }
.blog-post-item > a {
  position: relative; background: var(--bg-glass); height: 100%;
  box-shadow: var(--shadow-sm); border-radius: var(--radius-lg); border: 1px solid var(--border);
  overflow: hidden; transition: var(--transition-base); display: block;
}
.blog-post-item > a:hover { border-color: var(--border-glow); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.blog-banner-box { width: 100%; height: 200px; overflow: hidden; }
.blog-banner-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.blog-post-item > a:hover .blog-banner-box img { transform: scale(1.05); }
.blog-banner-placeholder { display: flex; align-items: center; justify-content: center; min-height: 200px; background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(245, 214, 122, 0.1)); }
.blog-banner-placeholder span { font-size: 3.5rem; }
.blog-content { padding: 16px; }
.blog-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.blog-meta :is(.blog-category, time) { color: var(--text-muted); font-size: var(--fs-small); font-weight: var(--fw-light); }
.blog-meta .dot { background: var(--text-muted); width: 4px; height: 4px; border-radius: 50%; }
.blog-item-title { margin-bottom: 10px; line-height: 1.3; transition: color var(--transition-fast); }
.blog-post-item > a:hover .blog-item-title { color: var(--accent-1); }
.blog-text { color: var(--text-secondary); font-size: var(--fs-small); font-weight: var(--fw-light); line-height: 1.6; text-align: justify; }

/* ===== SCROLL REVEAL ===== */
.reveal-up { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-up.revealed { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (min-width: 450px) {
  .project-img, .blog-banner-box { height: auto; }
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 580px) {
  .sidebar, article { width: 520px; margin-inline: auto; padding: 30px; }
  .article-title { font-weight: var(--fw-bold); padding-bottom: 15px; }
  .article-title::after { width: 50px; height: 4px; }
  .icon-box { width: 48px; height: 48px; border-radius: 12px; font-size: 18px; }

  main { margin-top: 60px; margin-bottom: 100px; }

  .sidebar { max-height: 180px; margin-bottom: 30px; }
  .sidebar.active { max-height: 600px; }
  .sidebar-info { gap: 25px; }
  .avatar-box { border-radius: 24px; }
  .avatar-box img { width: 120px; }
  .info-content .name { margin-bottom: 12px; font-size: 1.3rem; }

  .info-more-btn { top: -30px; right: -30px; padding: 10px 15px; }
  .info-more-btn span { display: block; font-size: var(--fs-xs); }
  .info-more-btn ion-icon { display: none; }
  .separator { margin: 32px 0; }
  .contacts-list { gap: 20px; }

  .navbar { border-radius: 20px 20px 0 0; }
  .navbar-list { gap: 10px; }
  .navbar-link { font-size: 13px; padding: 18px 8px; }

  .service-list { grid-template-columns: 1fr 1fr; gap: 14px; }

  .timeline-list { margin-left: 65px; }
  .timeline-item:not(:last-child)::before { left: -40px; }
  .timeline-item::after { height: 8px; width: 8px; left: -43px; }
}

@media (min-width: 768px) {
  .sidebar, article { width: 700px; }
  .contacts-list { grid-template-columns: 1fr 1fr; gap: 30px 15px; }
  .navbar-link { font-size: 14px; }

  .filter-select-box { display: none; }
  .filter-list { display: flex; justify-content: flex-start; align-items: center; gap: 20px; padding-left: 5px; margin-bottom: 30px; }
  .filter-item button { color: var(--text-muted); font-size: var(--fs-body); transition: var(--transition-fast); padding: 6px 14px; border-radius: var(--radius-full); }
  .filter-item button:hover { color: var(--text-secondary); }
  .filter-item button.active { color: var(--accent-1); background: rgba(212, 175, 55, 0.08); }

  .project-list { grid-template-columns: 1fr 1fr; }
  .blog-posts-list { grid-template-columns: 1fr 1fr; }
  .achievements-list { grid-template-columns: 1fr 1fr; gap: 14px; }
}

@media (min-width: 1024px) {
  .sidebar, article { width: 950px; box-shadow: var(--shadow-lg); }
  main { margin-bottom: 60px; }

  .main-content { position: relative; width: max-content; margin: auto; }

  .navbar { position: absolute; bottom: auto; top: 0; left: auto; right: 0; width: max-content; border-radius: 0 var(--radius-lg); padding: 0 20px; box-shadow: none; }
  .navbar-list { gap: 20px; padding: 0 15px; }
  .navbar-link { font-weight: var(--fw-medium); }

  .service-list { grid-template-columns: 1fr 1fr; gap: 16px; }
  .project-list { grid-template-columns: repeat(3, 1fr); }
  .blog-banner-box { height: 230px; }
}

@media (min-width: 1250px) {
  .sidebar, article { width: auto; }
  article { min-height: 100%; }

  main { max-width: 1200px; margin-inline: auto; display: flex; justify-content: center; align-items: stretch; gap: 25px; }
  .main-content { min-width: 75%; width: 75%; margin: 0; }

  .sidebar { position: sticky; top: 60px; max-height: max-content; height: 100%; margin-bottom: 0; padding-top: 60px; z-index: 1; }
  .sidebar-info { flex-direction: column; }
  .avatar-box img { width: 150px; }
  .info-content .name { white-space: nowrap; text-align: center; }
  .info-content .title { margin: auto; }
  .info-more-btn { display: none; }
  .sidebar-info-more { opacity: 1; visibility: visible; }
  .contacts-list { grid-template-columns: 1fr; }
  .contact-info :is(.contact-link) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .separator:last-of-type { margin: 15px 0; opacity: 0; }
  .social-list { justify-content: center; }
  .timeline-text { max-width: 700px; }
}

/* Mobile tooltip adjustment */
@media (max-width: 768px) {
  .tooltip { top: 50%; left: 110%; transform: translateY(-50%); }
}

@media (max-width: 450px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-cta { flex-direction: column; align-items: center; }
  .project-img { height: 160px; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-up { opacity: 1 !important; transform: none !important; }
}
