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

:root {
    --bg: #f0ebe3;
    --bg-alt: #faf8f5;
    --card: #ffffff;
    --text: #2d2d2d;
    --text-light: #6b6b6b;
    --accent: #c1694f;
    --accent-light: #e8a890;
    --accent-dark: #a3523a;
    --warm-1: #d4a373;
    --warm-2: #e9c46a;
    --warm-3: #9b8baf;
    --warm-4: #6b9080;
    --warm-5: #c1694f;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.12);
    --radius: 20px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-body: 'DM Sans', sans-serif;
    --font-heading: 'Playfair Display', serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: rgba(240, 235, 227, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 12px 40px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.nav-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: var(--accent);
    color: white;
}

.nav-socials {
    display: flex;
    gap: 8px;
}

.nav-socials a {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    background: rgba(0, 0, 0, 0.04);
}

.nav-socials a:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: rgba(240, 235, 227, 0.98);
    backdrop-filter: blur(20px);
    padding: 20px;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
    transform: translateY(-100%);
    opacity: 0;
    transition: var(--transition);
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
}

.mobile-link {
    text-decoration: none;
    color: var(--text);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
}

.mobile-link:hover {
    background: var(--accent);
    color: white;
}

.mobile-socials {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
}

.mobile-socials a {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text);
    text-decoration: none;
    font-size: 18px;
    transition: var(--transition);
}

.mobile-socials a:hover {
    background: var(--accent);
    color: white;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 40px 80px;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-greeting {
    font-size: 18px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
    opacity: 0;
    animation: fadeUp 0.6s ease forwards;
}

.hero-name {
    font-family: var(--font-heading);
    font-size: clamp(48px, 6vw, 80px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.1s forwards;
}

.hero-role {
    font-size: 20px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-light);
    max-width: 450px;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.3s forwards;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.4s forwards;
}

.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(193, 105, 79, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid rgba(0, 0, 0, 0.15);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn i {
    margin-right: 6px;
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.3s forwards;
}

.hero-image-card {
    width: 340px;
    height: 440px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.hero-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-float-card {
    position: absolute;
    background: white;
    padding: 12px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    animation: float 3s ease-in-out infinite;
}

.hero-float-card i {
    font-size: 18px;
    color: var(--accent);
}

.card-1 {
    top: 30px;
    left: -20px;
    animation-delay: 0s;
}

.card-2 {
    bottom: 80px;
    right: -30px;
    animation-delay: 1s;
}

.card-3 {
    bottom: 20px;
    left: -10px;
    animation-delay: 2s;
}

/* ===== SECTIONS ===== */
.section {
    padding: 80px 40px;
}

.section-alt {
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 800;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-light);
}

/* ===== MASONRY / PINTEREST GRID ===== */
.masonry {
    max-width: 1200px;
    margin: 0 auto;
    columns: 3;
    column-gap: 24px;
}

.pin {
    break-inside: avoid;
    margin-bottom: 24px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

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

.pin:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

/* Clickable Pins */
.pin-clickable {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

/* ===== PIN TYPES ===== */

/* Content Pins */
.pin-content {
    padding: 28px;
}

.pin-content h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    margin-bottom: 12px;
}

.pin-content p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
}

.pin-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
    color: white;
}

.pin-about .pin-icon { background: var(--warm-1); }
.pin-education .pin-icon { background: var(--warm-3); }
.pin-skills .pin-icon { background: var(--warm-4); }
.pin-experience .pin-icon { background: var(--warm-5); }
.pin-achievements .pin-icon { background: var(--warm-2); }

/* Photo Pins */
.pin-photo {
    position: relative;
    cursor: pointer;
}

.pin-photo img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.pin-photo:hover img {
    transform: scale(1.05);
}

.pin-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 20px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    opacity: 0;
    transition: var(--transition);
}

.pin-photo:hover .pin-overlay {
    opacity: 1;
}

.pin-overlay span {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

/* Education */
.edu-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.edu-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.edu-degree {
    display: block;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.edu-school {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.edu-year {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
}

/* Skills */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 6px 14px;
    background: rgba(193, 105, 79, 0.08);
    color: var(--accent-dark);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* Experience */
.exp-item {
    padding-top: 8px;
}

.exp-role {
    display: block;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.exp-company {
    display: block;
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 4px;
}

.exp-period {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.exp-desc {
    font-size: 13px !important;
}

/* Achievements */
.achievement-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.achievement-list li {
    font-size: 13px;
    color: var(--text-light);
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.achievement-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warm-2);
}

.achievement-list li strong {
    color: var(--text);
}

/* Quote */
.pin-quote {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.pin-quote .pin-content {
    text-align: center;
    padding: 40px 28px;
}

.quote-icon {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 16px;
}

.quote-text {
    color: white !important;
    font-family: var(--font-heading);
    font-size: 20px !important;
    font-style: italic;
    line-height: 1.5 !important;
}

/* ===== PROJECT PINS ===== */
.project-header {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.smart-helmet {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.plant-detect {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.portfolio-proj {
    background: linear-gradient(135deg, var(--accent), var(--warm-1));
}

.project-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    backdrop-filter: blur(10px);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.project-tag {
    padding: 4px 10px;
    background: rgba(193, 105, 79, 0.08);
    color: var(--accent-dark);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-links {
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

.project-link {
    text-decoration: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--accent-dark);
}

/* Stats */
.pin-stats {
    background: var(--text);
}

.pin-stats .pin-content h3 {
    color: white;
    text-align: center;
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    color: var(--accent-light);
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== CONTACT ===== */
.contact-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.contact-card {
    background: var(--card);
    padding: 36px 28px;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: var(--transition);
    min-width: 0;
}

.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.contact-card i {
    font-size: 28px;
    color: var(--accent);
    margin-bottom: 16px;
}

.contact-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 8px;
}

.contact-card p {
    font-size: 13px;
    color: var(--text-light);
    word-break: break-word;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 32px;
    font-size: 14px;
    color: var(--text-light);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer strong {
    color: var(--accent);
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .masonry {
        columns: 2;
    }

    .hero-content {
        gap: 40px;
    }

    .hero-image-card {
        width: 280px;
        height: 360px;
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 14px 20px;
    }

    .nav-links,
    .nav-socials {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image-card {
        width: 260px;
        height: 340px;
    }

    .hero-float-card {
        display: none;
    }

    .section {
        padding: 60px 20px;
    }

    .masonry {
        columns: 1;
        max-width: 500px;
    }

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

@media (max-width: 480px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-name {
        font-size: 42px;
    }
}
