/* LEGO Design System - Design Tokens */
:root {
  --lego-red: #dc2626;
  --lego-blue: #2563eb;
  --lego-yellow: #eab308;
  --lego-green: #16a34a;
  --lego-orange: #ea580c;
  --lego-purple: #9333ea;
  --lego-pink: #ec4899;
  --lego-cyan: #0891b2;
  --lego-lime: #65a30d;
  --lego-magenta: #c2185b;
  --lego-teal: #0d9488;
  --lego-indigo: #4f46e5;
  
  /* Pastel color palette */
  --pastel-yellow: #fef3c7;      /* Soft yellow */
  --pastel-blue: #bfdbfe;        /* Light blue */
  --pastel-green: #bbf7d0;       /* Soft green */
  --pastel-pink: #f9a8d4;        /* Soft pink */
  --pastel-orange: #fed7aa;      /* Soft orange */
  --pastel-purple: #e9d5ff;      /* Soft purple */
  
  --lego-gray: #9aa3af;           /* studs highlight */
  --lego-dark: #1f2937;           /* text */
  --lego-bg: #f8fafc;             /* clean white bg */
  --brick-bg: #ffffff;            /* card plastic */
  --radius-brick: 16px;
  --shadow-brick: 0 6px 0 rgba(0,0,0,.2), 0 8px 20px rgba(0,0,0,.15);
  --shadow-stud: inset 0 2px 0 rgba(255,255,255,.7), inset 0 -2px 0 rgba(0,0,0,.25);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: #ffffff;
    color: var(--lego-dark);
    font-family: 'Poppins', system-ui, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    border: 0;
}

.body-plate {
    background-color: #ffffff; /* Set background to plain white */
    min-height: 100vh;
}

/* Layout utilities */
.wrap {
    max-width: 680px; /* Make boxes 15% narrower */
    margin: 0 auto; /* Center horizontally */
    padding: 0 24px; /* Only horizontal padding */
}

/* Header Image Styles */
.header-image-wrapper {
    text-align: center; /* Center the image within the wrapper */
    margin-top: 48px;
    margin-bottom: 24px;
}

.header-image {
    max-width: 250px; /* Make the header image smaller */
    height: auto; /* Maintain aspect ratio */
    border-radius: var(--radius-brick);
    box-shadow: var(--shadow-brick);
}

/* Section titles */
.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-top: 36px; /* Equal vertical spacing */
    margin-bottom: 36px;
    color: var(--lego-dark);
    text-align: center;
}

/* Grid layout for projects */
.grid {
    display: grid;
    gap: 29px; /* Further increased space between boxes */
    grid-template-columns: 1fr; /* Each project on its own line */
    /* Remove max-width here - let it inherit from .wrap */
}

/* Brick cards */
.brick-card {
    background: var(--brick-bg);
    border-radius: var(--radius-brick);
    box-shadow: var(--shadow-brick);
    padding: 12px 16px; /* Reduced vertical padding */
    border: 3px solid #e5e7eb; /* Reduced border weight */
    position: relative;
    transition: transform .12s ease, box-shadow .12s ease;
}

.brick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 0 rgba(0,0,0,.18), 0 16px 28px rgba(0,0,0,.12);
}

/* About brick - full width */
.about-brick {
    text-align: center;
    padding: 17px 16px 10px; /* Final padding adjustment */
    margin: 0;
}

.about-brick h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--lego-dark);
}

.about-brick p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--lego-dark);
    margin: 0; /* Remove all margins to allow flexbox to work */
}

/* Project card content */
.brick-card h3 {
    margin-bottom: 4px; /* Reduced space below title */
}

.brick-card h3 a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    color: var(--lego-dark);
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
}

.project-icon {
    color: #000000; /* Make icons black */
}

.brick-card p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 12px;
    color: var(--lego-dark);
}

.studs {
    display: none; /* This will hide the studs */
}


.brick-card:nth-child(1) h3,
.brick-card:nth-child(1) p {
    color: var(--lego-dark);
}

.brick-card:nth-child(2) {
    background: #2FE2F9; /* Vibrant cyan */
    border-color: #000000;
}

.brick-card:nth-child(2) h3,
.brick-card:nth-child(2) p {
    color: var(--lego-dark);
}

.brick-card:nth-child(3) {
    background: #5AD75A; /* Bright green */
    border-color: #000000;
}

.brick-card:nth-child(3) h3,
.brick-card:nth-child(3) p {
    color: var(--lego-dark);
}

.brick-card:nth-child(4) {
    background: #EF75DD; /* Bright pink */
    border-color: #000000;
}

.brick-card:nth-child(4) h3,
.brick-card:nth-child(4) p {
    color: var(--lego-dark);
}

.brick-card:nth-child(5) {
    background: #FF7F00; /* Bold orange */
    border-color: #000000;
}

.brick-card:nth-child(5) h3,
.brick-card:nth-child(5) p {
    color: var(--lego-dark);
}

.brick-card:nth-child(6) {
    background: #FFFF00; /* Bright yellow */
    border-color: #000000;
}

.brick-card:nth-child(6) h3,
.brick-card:nth-child(6) p {
    color: var(--lego-dark);
}

/* About brick - special styling */
.about-brick {
    background: #c084fc !important;
    border-color: #000000 !important;
}

.about-brick h2,
.about-brick p {
    color: var(--lego-dark) !important;
}

.about-brick .stud {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: var(--shadow-stud), 0 1px 3px rgba(0,0,0,0.2) !important;
}

/* Add more brick variations for larger portfolios */
.brick-card:nth-child(7) {
    background: var(--lego-lime);
    border-color: #4d7c0f;
}

.brick-card:nth-child(7) h3,
.brick-card:nth-child(7) p {
    color: white;
}

.brick-card:nth-child(7) .stud {
    background: rgba(255, 255, 255, 0.9);
}

.brick-card:nth-child(8) {
    background: var(--lego-magenta);
    border-color: #9f1239;
}

.brick-card:nth-child(8) h3,
.brick-card:nth-child(8) p {
    color: white;
}

.brick-card:nth-child(8) .stud {
    background: rgba(255, 255, 255, 0.9);
}

/* Enhanced stud appearance */
.stud {
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-stud), 0 1px 3px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Pastel brick card variations */
.brick-card:nth-child(1) {
    background: #FFFF00; /* Bright yellow */
    border-color: #000000;
}

/* LEGO stud buttons */
.stud-btn {
    display: inline-block;
    padding: 4px;
    color: #000000;
    text-decoration: none;
    font-size: 20px;
    background: transparent;
    transition: transform .08s ease, opacity .08s ease;
    box-shadow: none;
    margin-left: 8px;
    vertical-align: middle;
}

.stud-btn:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.stud-btn:active {
    transform: scale(0.95);
}

.stud-btn.red {
    background: linear-gradient(145deg, var(--lego-red), #c53030);
    box-shadow: 0 4px 0 #c53030, inset 0 2px 0 rgba(255,255,255,.4);
}

.stud-btn.blue {
    background: linear-gradient(145deg, var(--lego-blue), #2c5aa0);
    box-shadow: 0 4px 0 #2c5aa0, inset 0 2px 0 rgba(255,255,255,.4);
}

.stud-btn.yellow {
    background: linear-gradient(145deg, var(--lego-yellow), #d69e2e);
    color: #222;
    box-shadow: 0 4px 0 #d69e2e, inset 0 2px 0 rgba(255,255,255,.4);
}

.stud-btn.green {
    background: linear-gradient(145deg, var(--lego-green), #2f855a);
    box-shadow: 0 4px 0 #2f855a, inset 0 2px 0 rgba(255,255,255,.4);
}

/* Secret Message */
.secret-message {
    text-align: center;
    font-size: 16px;
    color: #d1d5db;
    margin: 30px 0; /* Single, balanced margin */
}

/* Footer */
.lego-footer {
    opacity: .8;
    text-align: center;
    margin: 0 0 30px; /* Set bottom margin for spacing below */
    padding: 0;
}

.lego-footer p {
    font-size: 14px;
    color: var(--lego-dark);
}

/* Links */
a {
    color: var(--lego-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus {
    outline: 3px solid var(--lego-yellow);
    outline-offset: 2px;
}

/* Responsive design - Mobile first */
@media (max-width: 768px) {
    .wrap {
        padding: 16px;
    }
    
    .lego-header {
        padding: 32px 16px;
    }
    
    .lego-header h1 {
        font-size: 32px;
    }
    
    .lego-header p {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .brick-card {
        padding: 12px 12px 16px;
    }
    
    .about-brick h2 {
        font-size: 22px;
    }
    
    .brick-card h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .lego-header h1 {
        font-size: 28px;
    }
    
    .studs {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stud {
        height: 16px;
    }
}
