/* ============================================
   TRIAWAN PORTFOLIO - MODERN STYLES
   Modern CSS with Dark Theme & Glassmorphism
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
  /* Colors - Dark Theme */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --bg-card: rgba(25, 25, 35, 0.8);

  /* Gradient Accents */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --gradient-accent: linear-gradient(135deg, #00d4ff 0%, #7c3aed 50%, #f472b6 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-accent: #00d4ff;

  /* Accent Colors */
  --accent-blue: #00d4ff;
  --accent-purple: #7c3aed;
  --accent-pink: #f472b6;
  --accent-green: #10b981;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;

  /* Container */
  --container-max: 1200px;
  --container-padding: 1.5rem;
}

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background Gradient Effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 60%, rgba(0, 212, 255, 0.08) 0%, transparent 40%);
  pointer-events: none;
  z-index: -1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-purple);
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.main-content {
  padding-top: 100px;
  min-height: calc(100vh - 200px);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  padding: var(--space-sm) 0;
  background: rgba(10, 10, 15, 0.95);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--glass-bg);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

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

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    padding: var(--space-xl);
    gap: var(--space-md);
    transform: translateY(-150%);
    opacity: 0;
    transition: all var(--transition-normal);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-3xl);
  position: relative;
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.hero-subtitle {
  font-size: 0.875rem;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: var(--space-lg);
  font-weight: 600;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: var(--space-xl);
  line-height: 1.15;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--glass-border);
}

.btn-outline:hover {
  background: var(--glass-bg);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-purple);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
}

/* Book Card Specific */
.book-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.book-card img {
  width: 180px;
  height: auto;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: all var(--transition-normal);
}

.book-card:hover img {
  transform: scale(1.05) rotate(-2deg);
}

.book-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.book-card .year-badge {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.book-card .author {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-md);
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

.section-header p {
  max-width: 600px;
  margin: var(--space-lg) auto 0;
  color: var(--text-muted);
}

/* ============================================
   PROFILE LINKS (Publications Page)
   ============================================ */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  text-decoration: none;
}

.profile-card .icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-subtle);
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.profile-card .info h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.profile-card .info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.profile-card:hover .icon {
  background: var(--gradient-primary);
}

/* Awards Section */
.award-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.award-item .medal {
  font-size: 2rem;
  flex-shrink: 0;
}

.award-item h3 {
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.award-item a {
  font-size: 0.9rem;
}

/* ============================================
   TIMELINE (Speaker Page)
   ============================================ */
.timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-primary);
}

.timeline-item {
  position: relative;
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-xl) - 5px);
  top: var(--space-xl);
  width: 12px;
  height: 12px;
  background: var(--accent-purple);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
}

.timeline-item h3 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.timeline-item .meta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.timeline-item .year-tag {
  background: var(--glass-bg);
  color: var(--accent-blue);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
}

.timeline-item .speakers {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.timeline-item .link-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--accent-blue);
  font-size: 0.9rem;
  margin-top: var(--space-sm);
}

.timeline-item .link-btn:hover {
  color: var(--accent-purple);
}

/* Category Tabs */
.category-section {
  margin-bottom: var(--space-3xl);
}

.category-title {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--glass-border);
}

.category-title .emoji {
  font-size: 1.5rem;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-hero {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 1.5rem;
  color: var(--text-primary);
  background: var(--bg-card);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  margin: var(--space-xl) 0;
  transition: all var(--transition-normal);
}

.contact-email:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
  color: var(--accent-blue);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  max-width: 800px;
  margin: 0 auto;
}

.social-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  text-decoration: none;
}

.social-card .icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-subtle);
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  transition: all var(--transition-normal);
}

.social-card:hover .icon {
  background: var(--gradient-primary);
  transform: scale(1.1);
}

.social-card span {
  font-weight: 500;
  color: var(--text-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: var(--space-xl) 0;
  margin-top: var(--space-3xl);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.9rem;
}

.footer .copyleft {
  display: inline-block;
  transform: rotate(180deg);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 {
  animation-delay: 0.1s;
}

.animate-delay-2 {
  animation-delay: 0.2s;
}

.animate-delay-3 {
  animation-delay: 0.3s;
}

.animate-delay-4 {
  animation-delay: 0.4s;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
  text-align: center;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: var(--space-md);
}

.mb-2 {
  margin-bottom: var(--space-xl);
}

.mb-3 {
  margin-bottom: var(--space-3xl);
}

.mt-1 {
  margin-top: var(--space-md);
}

.mt-2 {
  margin-top: var(--space-xl);
}

.mt-3 {
  margin-top: var(--space-3xl);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-purple);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Laptop / Medium Screens (769px - 1440px) */
@media (min-width: 769px) and (max-width: 1440px) {
  :root {
    --container-max: 1000px;
    --container-padding: 2rem;
  }

  .hero {
    min-height: calc(100vh - 80px);
    padding: var(--space-xl) 0 var(--space-2xl);
  }

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

  .hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
  }

  .hero-description {
    font-size: 1rem;
    max-width: 500px;
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .card {
    padding: var(--space-lg);
  }

  .section-header {
    margin-bottom: var(--space-2xl);
  }
}

/* Small Laptops (1024px - 1280px) */
@media (min-width: 1024px) and (max-width: 1280px) {
  .hero-content {
    max-width: 600px;
  }

  .hero-title {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
  }

  .hero-description {
    font-size: 1rem;
    line-height: 1.7;
  }
}

/* Mobile / Small Screens */
@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
  }

  .hero {
    min-height: 70vh;
    padding: var(--space-xl) 0;
  }

  .hero-content {
    max-width: 100%;
    padding: 0 var(--space-md);
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .section {
    padding: var(--space-xl) 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}