
/* CSS Variables for Theme Management */
:root {
    --bg-color: #f5f5f5;
    --text-color: #151515;
    --accent-color: #FFD600;
    --grid-color: rgba(21, 21, 21, 0.05);
    --transition-speed: 0.6s;
}

[data-theme="dark"] {
    --bg-color: #151515;
    --text-color: #f5f5f5;
    --grid-color: rgba(245, 245, 245, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1),
    color var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    cursor: none;
}

#trail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

/* Small dot as custom cursor */
.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-color, #fff); /* use your theme color */
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

a, button, .cta-button, .skill-card {
  cursor: none; /* hide hand on hover */
}

/* Grid Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 30px;
    background: var(--text-color);
    border-radius: 20px;
    cursor: pointer;
    z-index: 1000;
    transition: all var(--transition-speed) ease;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-color);
    top: 2px;
    left: 2px;
    transition: transform var(--transition-speed) ease;
}

[data-theme="dark"] .theme-toggle::before {
    transform: translateX(30px);
}

/* Navigation */
nav {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 1000;
    /* mix-blend-mode: difference; */
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Sections */
section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 80px 20px;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Hero Section */
#hero {
    position: relative;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1.2s ease;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 30px;
    position: relative;
}

.accent-text {
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Scribble SVG */
.scribble {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    animation: drawScribble 2s ease forwards;
    animation-delay: 0.8s;
}

.scribble-1 {
    top: -20px;
    left: -40px;
    width: 120px;
}

.scribble-2 {
    bottom: -30px;
    right: -50px;
    width: 100px;
    transform: rotate(180deg);
}

/* Blueprint Section */
#blueprint {
    background: linear-gradient(135deg, transparent, rgba(255, 214, 0, 0.03));
}

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

.skill-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid var(--grid-color);
    padding: 40px 30px;
    border-radius: 8px;
    position: relative;
    transition: all 0.4s ease;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 214, 0, 0.1);
}

.skill-card:hover::before {
    transform: translateX(0);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    filter: grayscale(100%);
    transition: filter 0.4s ease;
}

.skill-card:hover .skill-icon {
    filter: grayscale(0%);
}

.skill-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.skill-description {
    opacity: 0.8;
    line-height: 1.6;
}

/* Portfolio Section */
#portfolio {
    padding: 100px 20px;
}

.portfolio-grid {
    display: grid;
    gap: 80px;
    margin-top: 60px;
}

.project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.project.visible {
    opacity: 1;
    transform: translateY(0);
}

.project:nth-child(even) {
    grid-template-columns: 1fr 1fr;
    direction: rtl;
}

.project:nth-child(even) > * {
    direction: ltr;
}

.project-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--accent-color), transparent);
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 214, 0, 0.1) 10px,
        rgba(255, 214, 0, 0.1) 20px
    );
}

.project-content {
    padding: 20px;
}

.project-number {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.project-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
}

.project-description {
    font-size: 1.1rem;
    opacity: 0.8;
    line-height: 1.7;
    margin-bottom: 30px;
}

.project-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.project-link::after {
    content: '→';
    margin-left: 10px;
    transition: margin-left 0.3s ease;
}

.project-link:hover::after {
    margin-left: 20px;
}

/* Colophon Section */
#colophon {
    text-align: center;
    position: relative;
}

.colophon-content {
    max-width: 800px;
    margin: 0 auto;
}

.colophon-title {
    font-size: clamp(3rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.cta-button {
    display: inline-block;
    margin-top: 40px;
    padding: 20px 50px;
    background: var(--accent-color);
    color: #151515;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 214, 0, 0.4);
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes drawScribble {
    to {
        opacity: 1;
        stroke-dashoffset: 0;
    }
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    will-change: transform;
}

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .project,
    .project:nth-child(even) {
        grid-template-columns: 1fr;
        direction: ltr;
    }

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