/* 
   Professional Portfolio Design System 
   Theme: Modern Tech (Dark/Slate/Emerald)
*/

:root {
    /* Color Palette */
    --bg-body: #0f172a;
    /* Slate 900 */
    --bg-card: #1e293b;
    /* Slate 800 */
    --bg-card-hover: #334155;
    /* Slate 700 */

    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    --accent-primary: #10b981;
    /* Emerald 500 */
    --accent-glow: rgba(16, 185, 129, 0.2);
    --accent-dark: #059669;
    /* Emerald 600 */

    --border-color: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 70px;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    --backdrop-blur: blur(12px);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.text-gradient {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Nav */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: var(--backdrop-blur);
    border-bottom: var(--glass-border);
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

.logo span {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    margin-bottom: 1.5rem;
}

.hero-text .lead {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-visual img {
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    max-height: 400px;
    object-fit: cover;
}

/* Tech Stack Icons */
.tech-stack {
    margin-top: 3rem;
    display: flex;
    gap: 1.5rem;
    opacity: 0.7;
    align-items: center;
}

.tech-stack img {
    height: 32px;
    width: auto;
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.tech-stack img:hover {
    filter: grayscale(0%);
}

/* Sections Generic */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
}

/* Services Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 1rem;
    transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.card-icon {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    display: inline-block;
    background: rgba(16, 185, 129, 0.1);
    padding: 1rem;
    border-radius: 0.75rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    background: #0b1120;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Language Selector */
.lang-select {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: inherit;
}

.lang-select option {
    background: var(--bg-card);
}

/* Rain Container */
.rain-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
    /* More subtle */
}

.rain-letter {
    position: absolute;
    color: var(--accent-primary);
    font-family: monospace;
    font-weight: bold;
    opacity: 0;
    animation-name: rain;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes rain {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

.nav-links.active {
    display: flex;
}

.menu-toggle {
    display: block;
}

/* Footer Love */
.made-with-love {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    opacity: 0.8;
}

.made-with-love .heart {
    color: var(--accent-primary);
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Enhanced Interactions */
.hero-img {
    transition: transform 0.5s ease;
}

.hero-visual:hover .hero-img {
    transform: scale(1.02) rotate(1deg);
}

/* Tech Stack Pulse */
.tech-stack img {
    transition: transform 0.3s, filter 0.3s;
}

.tech-stack img:hover {
    transform: translateY(-5px) scale(1.1);
    filter: grayscale(0%);
}