:root {
  --bg-color: #0d0d0d;
  --surface-color: #161616;
  --accent-color: #ffffff;
  --text-main: #e2e2e2;
  --text-dim: #888888;
  --sidebar-width: clamp(280px, 18vw, 320px);
  --transition-speed: 0.4s;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.no-transition * {
  transition: none !important;
}

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

/* Base Responsive Elements */
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow: hidden;
  display: flex;
  height: 100vh;
  width: 100%;
}

/* Sidebar */
aside {
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--surface-color);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  position: fixed;
  left: 0;
  top: 0;
  transition: transform var(--transition-speed) var(--ease);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.sidebar-content {
  padding: clamp(40px, 7vh, 80px) 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: padding var(--transition-speed) var(--ease);
}

#close-sidebar {
  display: none;
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  opacity: 0.4;
  padding: 8px;
}

aside img#profile-image {
  width: clamp(80px, 10vw, 110px);
  height: clamp(80px, 10vw, 110px);
  border-radius: 50%;
  margin-bottom: 24px;
  background: #222;
  object-fit: cover;
}

aside h2 {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-bottom: 40px;
}

#nav-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

#nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  transition: 0.3s;
  width: fit-content;
}

#nav-links a:hover, #nav-links a.active {
  color: var(--accent-color);
  transform: translateX(6px);
}

.social-links {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.social-icon img {
  width: 18px;
  height: 18px;
  filter: invert(1) opacity(0.4);
}

.contact-info {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
}

.email-label {
  color: var(--text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 8px;
}

.email-container {
  position: relative;
  width: 100%;
  min-height: 34px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.particle-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.real-email {
  display: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.7rem, 2.5vw, 0.8rem);
  word-break: break-all;
  line-height: 1.4;
}

/* Main Panel */
.main-panel {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-speed) var(--ease);
  height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

header {
  height: 80px;
  padding: 0 clamp(20px, 5vw, 60px);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#toggle-sidebar {
  display: none;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 10px;
  margin-left: -10px;
  z-index: 10;
}

#header-profile-image {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0 auto;
  transition: transform var(--transition-speed) var(--ease), opacity var(--transition-speed) var(--ease);
}

body.sidebar-active #header-profile-image {
  transform: translateX(-150px) scale(0.5);
  opacity: 0;
}

main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 40px clamp(20px, 5vw, 60px) 100px;
}

.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

section {
  display: none;
}

section.active {
  display: block;
  animation: slideIn var(--transition-speed) var(--ease) forwards;
}

@keyframes slideIn {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  margin: 4rem 0 1.2rem;
  font-weight: 600;
  color: var(--accent-color);
}

.news-item {
  display: flex;
  gap: 20px;
  align-items: baseline;
  background: var(--surface-color);
  padding: 16px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-bottom: 12px;
}

.news-date {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
  min-width: 80px;
}

.news-item p {
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 24px;
}

.work-item {
  background: var(--surface-color);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: 0.3s;
}

.work-item:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.1);
}

.work-images img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.work-info {
  padding: 24px;
}

.work-info h3 { font-size: 1.1rem; margin-bottom: 8px; font-weight: 600; }
.work-info p { font-size: 0.9rem; color: var(--text-dim); line-height: 1.5; }

#mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  backdrop-filter: blur(2px);
}

#mobile-overlay.visible {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 1024px) {
  :root { --sidebar-width: 260px; }
}

@media (max-width: 768px) {
  aside { transform: translateX(-100%); width: 280px; max-width: 85vw; }
  aside.visible { transform: translateX(0); }
  .main-panel { margin-left: 0; }
  #toggle-sidebar { display: block; }
  #close-sidebar { display: block; }
  header { padding: 0 20px; height: 60px; justify-content: space-between; position: relative; }
  #header-profile-image { display: block; position: absolute; left: 50%; transform: translateX(-50%); }
  main { padding: 20px 20px 60px; }
  aside .sidebar-content { padding: 60px 20px 40px; } /* Reduced padding for more horizontal space */
  h1 { font-size: 1.8rem; }
  .content-wrapper { max-width: 100%; }
  .work-grid { grid-template-columns: 1fr; }
}

/* Footer Ending Banner */
.ending-banner {
  margin-top: 60px;
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content p {
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-divider {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  margin: 20px auto 0;
  opacity: 0.3;
}
