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

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-dark: #1a1a1a;
    --gray-medium: #4a4a4a;
    --gray-light: #e0e0e0;
    --gray-lighter: #f5f5f5;
    
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-main);
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--black);
    color: var(--white);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-light);
    padding: 20px 0;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -1px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: var(--black);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
}

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

/* Floating/Ticker Text Animation */
.floating-text {
    position: absolute;
    top: 20%;
    left: 0;
    width: 200%;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.1;
    font-weight: 700;
    white-space: nowrap;
    animation: slide 20s linear infinite;
}

.ticker {
    display: inline-block;
    padding-right: 100px;
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Hero Title */
.hero-title {
    font-size: clamp(48px, 8vw, 120px);
    font-weight: 900;
    line-height: 0.9;
    margin-bottom: 40px;
    letter-spacing: -3px;
}

.hero-title .line {
    display: block;
    overflow: hidden;
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: calc(var(--line-index, 0) * 0.1s);
    opacity: 0;
    transform: translateY(100px);
}

.hero-title .line:nth-child(1) { --line-index: 0; }
.hero-title .line:nth-child(2) { --line-index: 1; }
.hero-title .line:nth-child(3) { --line-index: 2; }

.hero-title .accent {
    background: var(--black);
    color: var(--white);
    padding: 10px 20px;
    margin: 20px 0;
    display: inline-block;
}

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

/* Hero Subtitle */
.hero-subtitle {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeIn 1s 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Terminal Window */
.terminal-window {
    background: var(--black);
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    font-family: var(--font-mono);
    opacity: 0;
    animation: fadeIn 1s 0.7s forwards;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.terminal-header {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-medium);
}

.terminal-dot:nth-child(1) { background: #ff5f56; }
.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #27c93f; }

.terminal-content {
    color: var(--white);
    font-size: 14px;
}

.terminal-prompt {
    color: #27c93f;
    margin-right: 10px;
}

.terminal-cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Sections */
section {
    padding: 100px 0;
    position: relative;
}

.section-number {
    font-size: 180px;
    font-weight: 900;
    color: var(--gray-lighter);
    position: absolute;
    top: 50px;
    right: 40px;
    z-index: -1;
    line-height: 1;
}

.section-title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 900;
    margin-bottom: 60px;
    letter-spacing: -2px;
}

/* About Section */
.about {
    background: var(--gray-lighter);
}

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

.principle-card {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.principle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--black);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

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

.principle-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.principle-number {
    font-size: 48px;
    font-weight: 900;
    color: var(--gray-light);
    margin-bottom: 20px;
}

.principle-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    transition: var(--transition);
}

.principle-card p {
    color: var(--gray-medium);
    line-height: 1.8;
}

/* Stack Section */
.stack-categories {
    display: grid;
    gap: 40px;
}

.stack-category {
    padding-bottom: 40px;
    border-bottom: 1px solid var(--gray-light);
}

.stack-category:last-child {
    border-bottom: none;
}

.category-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tech-tag {
    background: var(--black);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.tech-tag:hover {
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

/* Projects Section */
.projects {
    background: var(--gray-lighter);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 0;
}

.project-card:hover::before {
    transform: translateY(0);
}

.project-card:hover * {
    color: var(--white);
    position: relative;
    z-index: 1;
}

.project-number {
    font-size: 72px;
    font-weight: 900;
    color: var(--gray-light);
    margin-bottom: 20px;
    transition: var(--transition);
}

.project-card h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    transition: var(--transition);
}

.project-card p {
    color: var(--gray-medium);
    margin-bottom: 20px;
    transition: var(--transition);
}

.project-link {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

/* Contact Section */
.contact-content {
    max-width: 800px;
}

.contact-subtitle {
    font-size: 24px;
    margin-bottom: 40px;
    color: var(--gray-medium);
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: var(--black);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.contact-link:hover::before {
    width: 400px;
    height: 400px;
}

.contact-link:hover {
    color: var(--black);
}

.contact-link:hover .arrow {
    transform: translateX(5px);
    color: var(--black);
}

.contact-link span {
    position: relative;
    z-index: 1;
}

.arrow {
    font-size: 20px;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

/* Footer */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .nav-container {
        padding: 0 20px;
    }
    
    .nav-links {
        gap: 20px;
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 48px;
        letter-spacing: -1px;
    }
    
    .section-number {
        font-size: 80px;
        top: 20px;
        right: 20px;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .principles-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .terminal-window {
        font-size: 12px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Loading Animation */
@keyframes loadIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav,
section {
    animation: loadIn 0.6s ease forwards;
}
